Skip to content

Commit cdc2dca

Browse files
committed
fix: align skill tool TypeScript types with JSON schema
Update the args parameter in NativeToolArgs and SkillParams to allow null in addition to string, matching the JSON schema definition where args has type: ['string', 'null'] and is in the required array. This aligns the TypeScript interface with the OpenAI strict mode pattern used by other tools like codebase_search and execute_command.
1 parent 410a3f6 commit cdc2dca

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/core/tools/SkillTool.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import type { ToolUse } from "../../shared/tools"
55

66
interface SkillParams {
77
skill: string
8-
args?: string
8+
args?: string | null
99
}
1010

1111
export class SkillTool extends BaseTool<"skill"> {

src/shared/tools.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ export type NativeToolArgs = {
106106
codebase_search: { query: string; path?: string }
107107
generate_image: GenerateImageParams
108108
run_slash_command: { command: string; args?: string }
109-
skill: { skill: string; args?: string }
109+
skill: { skill: string; args?: string | null }
110110
search_files: { path: string; regex: string; file_pattern?: string | null }
111111
switch_mode: { mode_slug: string; reason: string }
112112
update_todo_list: { todos: string }

0 commit comments

Comments
 (0)