You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
improvement(copilot): share the unmounted-docs list, shrink the search default
Two places decide what the docs/ corpus is: the manifest generator (what is
readable) and the vector search's unscoped filter (what is findable). They
each carried their own copy of the excluded-section list. If they drift, a
hit in a section that is indexed but not mounted comes back as a chunk the
agent cannot then read — dropped as stale, silently shrinking the result set.
UNMOUNTED_DOCS_SECTIONS is now the one list both import.
search_docs returns 5 chunks by default instead of 10; raise topK when a pass
genuinely comes back thin.
A truncated docs page now routes to one more fetch instead of two. grep and
read cost the same single uncached fetch of the page, so grep is an
alternative to a read here, never a step after one.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: apps/sim/lib/copilot/tools/handlers/vfs.ts
+5-1Lines changed: 5 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -97,8 +97,12 @@ function truncateDocsPageToInlineCap(page: { content: string; totalLines: number
97
97
returnedLines: number
98
98
}{
99
99
constlines=page.content.split('\n')
100
+
// Route to ONE more fetch, not two. Telling the model to grep and then read
101
+
// costs two more uncached fetches of a page it already partly has; grep and
102
+
// read cost the same single fetch, so grep is an alternative to a read here,
103
+
// never a step before one.
100
104
constnotice=(shown: number)=>
101
-
`\n\n[Page truncated: showing lines 1-${shown} of ${page.totalLines}. Grep this path for the section you need, then read with offset/limit.]`
105
+
`\n\n[Page truncated: returned lines 1-${shown} of ${page.totalLines}. To continue, read this path with offset: ${shown}. To jump straight to a section, grep this path INSTEAD of reading it — grep is the same single fetch and returns only matching lines with their numbers.]`
0 commit comments