File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ export class TodoListContextProvider implements ITodoListContextProvider {
3838 . map ( part => part . value )
3939 . join ( '\n' ) ;
4040
41- if ( ! todoList . trim ( ) ) {
41+ if ( ! todoList . trim ( ) || todoList === 'No todo list found.' ) {
4242 return undefined ;
4343 }
4444
Original file line number Diff line number Diff line change 66import { BasePromptElementProps , PromptElement } from '@vscode/prompt-tsx' ;
77import { ITodoListContextProvider } from '../../prompt/node/todoListContextProvider' ;
88import { Tag } from '../../prompts/node/base/tag' ;
9- import { ToolName } from '../common/toolNames' ;
109
1110export interface TodoListContextPromptProps extends BasePromptElementProps {
1211 sessionId ?: string ;
@@ -29,9 +28,12 @@ export class TodoListContextPrompt extends PromptElement<TodoListContextPromptPr
2928 return null ;
3029 }
3130 const todoContext = await this . todoListContextProvider . getCurrentTodoContext ( sessionId ) ;
31+ if ( ! todoContext ) {
32+ return null ;
33+ }
3234 return (
3335 < Tag name = "todoList" >
34- { todoContext || < > Empty todo list. Call ` { ToolName . CoreManageTodoList } ` to set todos as needed. </ > }
36+ { todoContext }
3537 </ Tag >
3638 ) ;
3739 }
You can’t perform that action at this time.
0 commit comments