Files
moreminimore-vibe/e2e-tests/snapshots/context_manage.spec.ts_manage-context---smart-context-4.txt
Will Chen 06ad1a7546 Smart Context: deep (#1527)
<!-- CURSOR_SUMMARY -->
> [!NOTE]
> Introduce a new "deep" Smart Context mode that supplies versioned
files (by commit) to the engine, adds code search rendering, stores
source commit hashes, improves search-replace recovery, and updates
UI/tests.
> 
> - **Smart Context (deep)**:
> - Replace `conservative` with `deep`; limit context to ~200 turns;
send `sourceCommitHash` per message.
> - Build and pass `versioned_files` (hash-id map + per-message file
refs) and `app_id` to engine.
> - **DB**:
>   - Add `messages.source_commit_hash` (+ migration/snapshot).
> - **Engine/Processing**:
> - Retry Turbo Edits v2: first re-read then fallback to `dyad-write` if
search-replace fails.
> - Include provider options and versioned files in requests; add
`getCurrentCommitHash`/`getFileAtCommit`.
> - **UI**:
>   - Pro mode selector: new `deep` option; tooltips polish.
> - Add `DyadCodeSearch` and `DyadCodeSearchResult` components; parser
supports new tags.
> - **Tests/E2E**:
> - New `smart_context_deep` e2e; update snapshots to include `app_id`
and deep mode; adjust Playwright timeout.
>   - Unit tests for versioned codebase context.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
e3d3bffabb2bc6caf52103461f9d6f2d5ad39df8. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
2025-11-06 10:45:39 -08:00

125 lines
4.2 KiB
Plaintext

{
"body": {
"model": "gemini/gemini-2.5-pro",
"max_tokens": 65535,
"temperature": 0,
"messages": [
{
"role": "system",
"content": "[[SYSTEM_MESSAGE]]"
},
{
"role": "user",
"content": "[dump]"
},
{
"role": "assistant",
"content": "[[dyad-dump-path=*]]"
},
{
"role": "user",
"content": "[dump]"
},
{
"role": "assistant",
"content": "[[dyad-dump-path=*]]"
},
{
"role": "user",
"content": "[dump]"
}
],
"stream": true,
"thinking": {
"type": "enabled",
"include_thoughts": true,
"budget_tokens": 4000
},
"dyad_options": {
"files": [
{
"path": ".env.foobar",
"content": "// File contents excluded from context",
"force": false
},
{
"path": "a.ts",
"content": "// a.ts\n",
"force": false
},
{
"path": "AI_RULES.md",
"content": "# AI_RULES.md\n",
"force": false
},
{
"path": "exclude/exclude.ts",
"content": "// exclude.ts: this file is not in any of the globs\n",
"force": false
},
{
"path": "exclude/exclude.tsx",
"content": "// exclude.tsx: this file is not in any of the globs\n",
"force": false
},
{
"path": "manual/baz.json",
"content": "[\"even json is included\"]\n",
"force": false
},
{
"path": "manual/file.ts",
"content": "",
"force": false
},
{
"path": "manual/sub-manual/sub-manual.js",
"content": "",
"force": false
},
{
"path": "src/components/ui/button.tsx",
"content": "// button.tsx\n",
"force": false
},
{
"path": "src/components/ui/helper.ts",
"content": "// helper.ts\n",
"force": false
},
{
"path": "src/dir/some.css",
"content": "/* some.css */\n",
"force": false
},
{
"path": "src/foo.ts",
"content": "// foo.ts\n",
"force": false
},
{
"path": "src/sub/sub1.ts",
"content": "// sub/sub1.ts\n",
"force": false
},
{
"path": "src/sub/sub2.tsx",
"content": "// sub/sub2.tsx\n",
"force": false
},
{
"path": "src/very-large-file.ts",
"content": "// very-large-file.ts\n\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n// 1234567890\n",
"force": false
}
],
"enable_lazy_edits": true,
"enable_smart_files_context": false,
"smart_context_mode": "balanced",
"app_id": 1
}
},
"headers": {
"authorization": "Bearer testdyadkey"
}
}