Files
oh-my-pi/packages/coding-agent/src/task/simple-mode.ts
T
can1357 8f1da70d79 feat(coding-agent): enabled simple-mode routing in task tool execution
- Added task.simple to settings and schema with default, schema-free, and independent modes.
- Added mode-aware task schema and validation to enforce context/schema rules per simple mode.
- Updated prompts and template rendering to tailor headers and guidance for each simple mode.
- Added simple-mode capabilities and updated TaskTool execution for mode-aware context behavior.
- Added tests for independent rendering and mode-specific rejection of invalid context or schema inputs.
2026-04-15 18:13:47 +02:00

28 lines
712 B
TypeScript

export const TASK_SIMPLE_MODES = ["default", "schema-free", "independent"] as const;
export type TaskSimpleMode = (typeof TASK_SIMPLE_MODES)[number];
interface TaskSimpleModeCapabilities {
contextEnabled: boolean;
customSchemaEnabled: boolean;
}
const TASK_SIMPLE_MODE_CAPABILITIES: Record<TaskSimpleMode, TaskSimpleModeCapabilities> = {
default: {
contextEnabled: true,
customSchemaEnabled: true,
},
"schema-free": {
contextEnabled: true,
customSchemaEnabled: false,
},
independent: {
contextEnabled: false,
customSchemaEnabled: false,
},
};
export function getTaskSimpleModeCapabilities(mode: TaskSimpleMode): TaskSimpleModeCapabilities {
return TASK_SIMPLE_MODE_CAPABILITIES[mode];
}