diff options
| author | Ben Sima <ben@bensima.com> | 2025-11-30 00:27:55 -0500 |
|---|---|---|
| committer | Ben Sima <ben@bensima.com> | 2025-11-30 00:27:55 -0500 |
| commit | d05ca4732710dd9cef7fffd998a03615ad2cb58c (patch) | |
| tree | f3a1259f49678b6b79c94fec1c1b8ede38af12a9 /Omni/Keys | |
| parent | c4c5556c2906dbbdca0d884479b4fb67d032de07 (diff) | |
Add task complexity field and model selection
All tests pass. Let me summarize the changes made:
- Added `taskComplexity :: Maybe Int` field to the `Task` data type
(1-5 - Updated SQL schema to include `complexity INTEGER` column -
Updated `FromRow` and `ToRow` instances to handle the new field -
Updated `tasksColumns` migration spec for automatic schema migration
- Updated `saveTask` to include complexity in SQL INSERT - Updated
`createTask` signature to accept `Maybe Int` for complexity
- Added `--complexity=<c>` option to the docopt help string -
Added complexity parsing in `create` command (validates 1-5 range)
- Added complexity parsing in `edit` command - Updated `modifyFn`
in edit to handle complexity updates - Updated all unit tests to
use new `createTask` signature with complexi - Added CLI tests for
`--complexity` flag parsing - Added unit tests for complexity field
storage and persistence
- Updated `selectModel` to use `selectModelByComplexity` based
on task c - Added `selectModelByComplexity :: Maybe Int -> Text`
function with map
- `Nothing` or 3-4 → `anthropic/claude-sonnet-4-20250514` (default)
- 1-2 → `anthropic/claude-haiku` (trivial/low complexity) - 5 →
`anthropic/claude-opus-4-20250514` (expert complexity)
- Updated `createTask` calls to include `Nothing` for complexity
Task-Id: t-141.5
Diffstat (limited to 'Omni/Keys')
0 files changed, 0 insertions, 0 deletions
