Commit Graph

7 Commits

Author SHA1 Message Date
Will Chen
4e9a927a7b smart context v3 (#1022)
<!-- This is an auto-generated description by cubic. -->

## Summary by cubic
Adds Smart Context v3 with selectable modes (Off, Conservative,
Balanced) and surfaces token savings in chat. Also improves token
estimation by counting per-file tokens when Smart Context is enabled.

- **New Features**
- Smart Context selector in Pro settings with three options.
Conservative is the default when enabled without an explicit choice.
- New setting: proSmartContextOption ("balanced"); undefined implies
Conservative.
- Engine now receives enable_smart_files_context and smart_context_mode.
- Chat shows a DyadTokenSavings card when the message contains
token-savings?original-tokens=...&smart-context-tokens=..., with percent
saved and a tooltip for exact tokens.
- Token estimation uses extracted file contents for accuracy when Pro +
Smart Context is on; otherwise falls back to formatted codebase output.

<!-- End of auto-generated description by cubic. -->
2025-08-20 14:16:07 -07:00
Will Chen
5d678c2ead Smart auto (#476) 2025-06-23 23:08:29 -07:00
Will Chen
897d2e522c enable engine for all models (#434) 2025-06-18 17:17:29 -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
e91a9c44fa Skip failing windows test (#332) 2025-06-04 10:31:13 -07:00
Will Chen
c227a08d11 Gateway e2e (#323) 2025-06-03 16:35:46 -07:00
Will Chen
fc1ebe9e8a e2e tests for engine (#322) 2025-06-03 16:11:16 -07:00