diff options
| author | soryu <soryu@soryu.co> | 2026-01-26 17:03:45 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-01-26 17:03:45 +0000 |
| commit | 6328477bc459eca0243b685553dbd75b925fdc8a (patch) | |
| tree | bf3eb29258244fea61daf93e128cd91540039dbc /makima/src/llm | |
| parent | 1d83595f81fbfcc034c37c2260d695f094f5776e (diff) | |
| download | soryu-6328477bc459eca0243b685553dbd75b925fdc8a.tar.gz soryu-6328477bc459eca0243b685553dbd75b925fdc8a.zip | |
Add dynamic contract type templates with user customization (#33)
- Add 'execute' contract type as a built-in template in backend
- Fix API response field name mismatch (types -> contractTypes)
- Remove duplicate ContractTypeTemplate definition in api.ts
- Merge built-in types from API with user templates from localStorage
- User templates created in the Templates page now appear in contract creation
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Diffstat (limited to 'makima/src/llm')
| -rw-r--r-- | makima/src/llm/templates.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/makima/src/llm/templates.rs b/makima/src/llm/templates.rs index 7a5bd38..8d3c04d 100644 --- a/makima/src/llm/templates.rs +++ b/makima/src/llm/templates.rs @@ -35,6 +35,7 @@ pub fn all_contract_types() -> Vec<ContractTypeTemplate> { vec![ simple_contract_type(), specification_contract_type(), + execute_contract_type(), ] } @@ -69,6 +70,18 @@ fn specification_contract_type() -> ContractTypeTemplate { } } +/// Execute-only contract type for immediate task execution +fn execute_contract_type() -> ContractTypeTemplate { + ContractTypeTemplate { + id: "execute".to_string(), + name: "Execute".to_string(), + description: "A minimal workflow with only an execute phase for immediate task execution without planning documents.".to_string(), + phases: vec!["execute".to_string()], + default_phase: "execute".to_string(), + is_builtin: true, + } +} + // ============================================================================= // File Templates // ============================================================================= |
