Skip to content
This repository was archived by the owner on Aug 1, 2025. It is now read-only.

Commit 73b8f6b

Browse files
committed
Clear initial context when switching to agentic mode
1 parent a0fce11 commit 73b8f6b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

vscode/webviews/chat/cells/messageCell/human/editor/HumanMessageEditor.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ export const HumanMessageEditor: FunctionComponent<{
346346
const defaultContext = useDefaultContextForChat()
347347

348348
useEffect(() => {
349-
if (isSent || !isFirstMessage || !editorRef?.current || selectedIntent === 'agentic') {
349+
if (isSent || !isFirstMessage || !editorRef?.current) {
350350
return
351351
}
352352

@@ -364,7 +364,7 @@ export const HumanMessageEditor: FunctionComponent<{
364364
const filteredItems = defaultContext?.initialContext.filter(
365365
item => !excludedTypes.has(item.type)
366366
)
367-
void editor.setInitialContextMentions(filteredItems)
367+
void editor.setInitialContextMentions(selectedIntent === 'agentic' ? [] : filteredItems)
368368
}, [defaultContext?.initialContext, isSent, isFirstMessage, currentChatModel, selectedIntent])
369369

370370
const focusEditor = useCallback(() => editorRef.current?.setFocus(true), [])

0 commit comments

Comments
 (0)