File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -46,13 +46,19 @@ export function registerPrompts(server: Server) {
46
46
} ) ;
47
47
48
48
server . setRequestHandler ( GetPromptRequestSchema , async ( request ) => {
49
+ // if (request.params.name == "examples") {
50
+ // return GetExamplePromptMessages();
51
+ // } else
49
52
if ( request . params . name !== "run_command" ) {
50
- throw new Error ( "Unknown prompt" ) ;
53
+ throw new Error (
54
+ "Unknown or not implemented prompt: " + request . params . name
55
+ ) ;
51
56
}
52
57
verbose_log ( "INFO: PromptRequest" , request ) ;
53
58
54
59
const command = String ( request . params . arguments ?. command ) ;
55
60
if ( ! command ) {
61
+ // TODO is there a format to follow for reporting failure like isError for tools?
56
62
throw new Error ( "Command is required" ) ;
57
63
}
58
64
// Is it possible/feasible to pass a path for the workdir when running the command?
@@ -96,3 +102,6 @@ export function registerPrompts(server: Server) {
96
102
return { messages } ;
97
103
} ) ;
98
104
}
105
+ function GetExamplePromptMessages ( ) : PromptMessage [ ] {
106
+ throw new Error ( "Function not implemented." ) ;
107
+ }
You can’t perform that action at this time.
0 commit comments