Commit Graph

31 Commits

Author SHA1 Message Date
Will Chen
2272c6d2b3 fix supabase prompt (#1435)
Fixes #1364

<!-- CURSOR_SUMMARY -->
> [!NOTE]
> Refreshes the Supabase prompt’s login state example to use the latest
onAuthStateChange event handling and unsubscribe pattern.
> 
> - **Prompts**:
>   - **Supabase system prompt (`src/prompts/supabase_prompt.ts`)**:
> - Revise login state management example to use
`supabase.auth.onAuthStateChange` with explicit events:
`INITIAL_SESSION`, `SIGNED_IN`, `SIGNED_OUT`, `PASSWORD_RECOVERY`,
`TOKEN_REFRESHED`, `USER_UPDATED`.
> - Update unsubscribe usage to `data.subscription.unsubscribe()` and
remove outdated async/getSession snippet.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
239d20769a02d102d168126f973a6cb4bf6d9e48. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
2025-10-02 21:53:05 -07:00
Will Chen
9cca1d2af0 Fix MCP & title bar (#1348)
<!-- This is an auto-generated description by cubic. -->

## Summary by cubic
Fixes MCP handoff by detecting an edit-code tool call and stopping
generation. Simplifies the title bar credit tooltip; also blocks dyad-*
tags in the system prompt and updates tests.

- **Bug Fixes**
- Stop generation on edit-code via hasToolCall; add a no-op edit-code
tool to signal handoff.
  - Combine tool-call stop with existing step limit for reliability.
  - Forbid <dyad-*> tags in the system prompt to prevent misuse.
- Remove credit usage/reset details from the title bar tooltip; keep the
delay note.
  - Update e2e snapshot to reflect the new prompt rule.

<!-- End of auto-generated description by cubic. -->
2025-09-22 15:50:18 -07:00
Will Chen
6d3c397d40 Add MCP support (#1028) 2025-09-19 15:43:39 -07:00
Will Chen
72acb31d59 More free models (#1244)
<!-- This is an auto-generated description by cubic. -->

## Summary by cubic
Adds support for free OpenRouter models and a new “Free (OpenRouter)”
auto option that fails over across free models for reliability. Improves
setup flow and UI with provider cards, a “Free” price badge, and an
OpenRouter setup prompt in chat.

- **New Features**
- Added OpenRouter free models: Qwen3 Coder (free), DeepSeek v3 (free),
DeepSeek v3.1 (free), marked with dollarSigns=0 and a “Free” badge.
- New auto model: “Free (OpenRouter)” that uses a fallback client to
cycle through free models with smart retry on transient errors.
- New SetupProviderCard component and updated SetupBanner with dedicated
Google and OpenRouter setup cards.
- Chat shows an OpenRouter setup prompt when “Free (OpenRouter)” is
selected and OpenRouter isn’t configured.
- New PriceBadge component in ModelPicker to display “Free” or price
tier.
- E2E: added setup flow test and option to show the setup screen in
tests.
- Model updates: added DeepSeek v3.1, updated Kimi K2 to kimi-k2-0905,
migrated providers to LanguageModelV2.

<!-- End of auto-generated description by cubic. -->
2025-09-10 14:20:17 -07:00
Toni Alatalo
e6c92a24ed Prompts: align examples to TypeScript (.tsx/.ts) to avoid .jsx drift (#1076)
The prompt text says:

> - Use TypeScript.

But in the examples there are .jsx files.

I got errors sometimes (in my fork with other changes too) that JSX got
generated instead of TSX. This seems to have fixed it for me.
    
<!-- This is an auto-generated description by cubic. -->
---

## Summary by cubic
Updated system prompt examples to use .tsx/.ts instead of .jsx/.js,
matching the “Use TypeScript” instruction. This prevents JSX drift and
reduces cases where generated code uses JSX instead of TSX.

<!-- End of auto-generated description by cubic. -->
2025-08-26 09:59:05 -07:00
Will Chen
72be54e6c5 verify jwt to false (#1085)
fixes #1010 
    
<!-- This is an auto-generated description by cubic. -->
---

## Summary by cubic
Disable automatic JWT verification for Supabase Edge Functions and
update prompts/templates to require and demonstrate manual auth
handling. Fixes #1010.

- **Bug Fixes**
  - Set verify_jwt: false in function deployment.
- Updated Supabase prompt with an Authentication section and guidance to
manually verify tokens.
- Adjusted the hello function template to check the Authorization header
and return 401 when missing.

<!-- End of auto-generated description by cubic. -->
2025-08-25 21:10:22 -07:00
Will Chen
d8e54d9a10 Parameterize sys prompt (#1082)
<!-- This is an auto-generated description by cubic. -->

## Summary by cubic
Parameterized the system prompt and tokenized it in e2e dumps to make
snapshots smaller and stable. No runtime behavior changes; future prompt
edits won’t churn tests.

- **Refactors**
- Exported BUILD_SYSTEM_PREFIX and BUILD_SYSTEM_POSTFIX from
system_prompt.ts.
- Updated test_helper to replace the full prompt with
${BUILD_SYSTEM_PREFIX}/${BUILD_SYSTEM_POSTFIX} tokens in message dumps.
- Regenerated e2e snapshots to use tokens, reducing ~270 lines per
snapshot.

<!-- End of auto-generated description by cubic. -->
2025-08-25 17:56:14 -07:00
Will Chen
475483dfe5 Update Supabase system prompt to follow security best practices (#760)
Fixes #604
2025-07-31 16:33:16 -07:00
Will Chen
14f13c7c92 Improve system prompt to avoid laziness (#751)
Fixes #749
2025-07-31 12:56:38 -07:00
Will Chen
fa29488b98 Update system prompt to make build mode more assertive about making c… (#473)
…ode changes

Fixes #457
2025-06-23 16:04:40 -07:00
Will Chen
9fbd7031d9 build ask mode (#444) 2025-06-19 10:42:51 -07:00
Will Chen
30b5c0d0ef Replace thinking with native Gemini thinking summaries (#400)
This uses Gemini's native [thinking
summaries](https://cloud.google.com/vertex-ai/generative-ai/docs/thinking#thought-summaries)
which were recently added to the API.

Why? The grafted thinking would sometimes cause weird issues where the
model, especially Gemini 2.5 Flash, got confused and put dyad tags like
`<dyad-write>` inside the `<think>` tags.

This also improves the UX because you can see the native thoughts rather
than having the Gemini response load for a while without any feedback.

I tried adding Anthropic extended thinking, however it requires temp to
be set at 1, which isn't ideal for Dyad's use case where we need precise
syntax following.
2025-06-16 17:29:32 -07:00
Will Chen
66f1bf2077 Update system prompt to avoid mixed-case directories (#374)
#347
2025-06-09 17:32:01 -07:00
Will Chen
91cfbbe36e Fix supabase prompt (#355) 2025-06-06 14:16:54 -07:00
Will Chen
6a8c90a15b Update system prompt to reduce Dyad hallucinating imports (#344)
Fixes #342
2025-06-05 16:55:46 -07:00
Will Chen
59c18c3859 Extract AI rules (#188) 2025-05-17 23:04:48 -07:00
Will Chen
63e41454c7 Explicit thinking (#183) 2025-05-16 22:35:08 -07:00
Will Chen
7c0ce1d45b slight system prompt adjustment to avoid dyad-file in output 2025-05-06 11:09:37 -07:00
Will Chen
1bbfedc668 Provide suggestions for running commands (restart/refresh/rebuild) (#62) 2025-05-01 21:44:51 -07:00
Will Chen
7ab1aab9b0 Refactor auto-suggestion (#40) 2025-04-28 22:43:37 -07:00
Will Chen
fbb81471da Inspiration prompts for home screen (#38) 2025-04-28 22:07:25 -07:00
Will Chen
9fb5439ecf Summarize into new chat suggested action (#34) 2025-04-28 16:14:12 -07:00
Will Chen
3b2fb12def Prompt to add supabase dependency 2025-04-23 13:01:17 -07:00
Will Chen
09deb98ba1 Add description (optional) to SQL query 2025-04-23 12:59:09 -07:00
Will Chen
ce3343978d Improve supabase system prompt to make deployment less annoying 2025-04-23 12:59:09 -07:00
Will Chen
6e1935bbba Support supabase function deployment 2025-04-23 12:59:09 -07:00
Will Chen
4294ce5767 Supabase support: client, auth & SQL 2025-04-23 12:59:09 -07:00
Will Chen
b07defc9b8 Support add dependencies as part of approval workflow 2025-04-21 16:07:40 -07:00
Will Chen
86b9720179 make markdown code block prohibition stronger 2025-04-18 14:14:59 -07:00
Will Chen
2deda72842 improve system prompt to avoid code markdown blocks 2025-04-11 13:35:59 -07:00
Will Chen
43f67e0739 Initial open-source release 2025-04-11 09:38:16 -07:00