Skip to content

Commit bd25ff7

Browse files
j15zclaude
andcommitted
docs(copilot): mark the inert @docs plumbing as the seam for a search_docs revival
The 'docs' ChatContext kind stays in the wire schema and the panel union but resolves to nothing server-side. Comments at all three layers now say why it is kept: a future @docs mention should be rebuilt on search_docs, not by reintroducing the kind or reviving the retired whole-message pre-search. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent a30ad25 commit bd25ff7

3 files changed

Lines changed: 12 additions & 3 deletions

File tree

apps/sim/lib/copilot/chat/post.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,8 @@ const ChatContextSchema = z.object({
143143
'logs',
144144
'workflow_block',
145145
'knowledge',
146+
// Inert today: processContextsServer drops docs contexts. Kept in the
147+
// schema so a future @Docs mention can resolve through search_docs.
146148
'docs',
147149
'table',
148150
'file',

apps/sim/lib/copilot/chat/process-contents.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,9 +219,11 @@ export async function processContextsServer(
219219
path: result.path,
220220
}
221221
}
222-
// `docs` contexts are intentionally inert: @docs tagging is disabled while
223-
// the docs corpus moves to the `docs/` VFS tree. A tagged context resolves
224-
// to nothing and is filtered out below.
222+
// `docs` contexts are intentionally inert: @docs tagging is disabled now
223+
// that the docs corpus lives in the `docs/` VFS tree. If @Docs returns,
224+
// resolve it here through searchDocs (the search_docs backend) rather
225+
// than reviving the retired whole-message pre-search. A tagged context
226+
// resolves to nothing and is filtered out below.
225227
return null
226228
} catch (error) {
227229
logger.error('Failed processing context (server)', { ctx, error })

apps/sim/stores/panel/types.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ export type ChatContext =
2828
| { kind: 'folder'; folderId: string; label: string }
2929
| { kind: 'filefolder'; fileFolderId: string; label: string }
3030
| { kind: 'scheduledtask'; scheduleId: string; label: string }
31+
/**
32+
* Inert today: the server drops it in processContextsServer. Kept so a
33+
* future @Docs mention can be revived on the search_docs backend instead of
34+
* reintroducing the kind across the wire schema and this union.
35+
*/
3136
| { kind: 'docs'; label: string }
3237
/**
3338
* A tab in the desktop browser or terminal panel, dragged into the input to

0 commit comments

Comments
 (0)