File tree Expand file tree Collapse file tree 2 files changed +12
-6
lines changed
Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Original file line number Diff line number Diff line change 11import { z , ZodRawShape } from "zod" ;
2- import { promptSchema , toolParameterSchema } from "../types.js" ;
2+ import { promptSchema , promptParameterSchema } from "../types.js" ;
33import { CodegenServer } from "../CodegenServer.js" ;
44
55
@@ -64,7 +64,7 @@ export class PromptsService {
6464 return response ;
6565 }
6666
67- createPromptParametersFromSchema ( schemas : toolParameterSchema [ ] ) {
67+ createPromptParametersFromSchema ( schemas : promptParameterSchema [ ] ) {
6868 const parameter : { [ k : string ] : any } = { } ;
6969 for ( const schema of schemas ) {
7070 const base = schema . optional ? z . any ( ) . optional ( ) : z . any ( ) ;
Original file line number Diff line number Diff line change 11export interface toolParameterSchema {
22 name : string ;
33 description : string ;
4- type : string ; // string | number | boolean | array (of string)
5- optional ?: boolean ; // if true, parameter is optional
4+ type : string ;
5+ }
6+
7+ export interface promptParameterSchema {
8+ name : string ;
9+ description : string ;
10+ type : string ;
11+ optional ?: boolean ;
612}
713
814export interface toolSchema {
@@ -15,8 +21,8 @@ export interface toolSchema {
1521export interface promptSchema {
1622 name : string ;
1723 description : string ;
18- parameters : toolParameterSchema [ ] ; // reuse parameter schema
19- callbackName : string ; // maps to PromptService internal function
24+ parameters : promptParameterSchema [ ] ;
25+ callbackName : string ;
2026}
2127
2228export interface responseSchema {
You can’t perform that action at this time.
0 commit comments