KKKKKKKEM (#1397, on v0.1.1164): plan, vision and advisor work on the
Mac, but the commit and tiny roles were still missing.
omp's own list of chat roles is CHAT_MODEL_ROLE_IDS in pi-tui's
overlays/model-browser.ts (read in the installed 18.6.1 and in 18.8.8 from
npm, the same list): default, smol, slow, vision, plan, commit, tiny,
memory, task, advisor. fc5dfa3c covered all but commit, tiny and memory;
this adds the three the same way (ompAt's role(), Quiet, a "<role>
thinking" field each, written under modelRoles in ~/.omp/agent/config.yml,
a value the user set off magpie stashed and put back on reset). omp's
other roles (KIND_ROLE_IDS: image, web, speech, dictation, judge) are for
kinds of model other than the chat models magpie writes for omp and are
left out.
In the GUI they join the roles square. Unset, each says what omp does
instead, from omp's source: commit and tiny take the smol role's model
(commit/model-selection.ts tries commit then smol; ROLE_CONFIGURED_FALLBACK
tiny → smol), memory the tiny role's, else smol's (memory → tiny). New
strings in zh, zh-TW, ja and de.
Tests:
- TestOmpEveryChatRole (Go): every chat role in omp's list is a field,
set to a magpie model and to a level; the user's own tiny role comes
back on reset. Red on the old omp.go (commit role: nil).
- omp-roles.test.cjs: the square lists commit, tiny and memory with their
unset notes, and commit's picker leads with "the smol role's model";
now in en, zh, ja and de, Chromium and WebKit, 1100px and 390px (16/16).
Red on the old app.js.
- i18n-keys, gui-ja, gui-de, gui-zh-tw pass; gofmt -l, GOOS=linux and
GOOS=windows go vet on internal/agent and internal/gui pass.
- go test -tags nogui ./... at load ~170: all packages pass except
internal/agent, gateway, library (10m timeouts) and gui
(TestOTelPreferencesAPI) and agent's TestCodexCustomProviderModelHasEfforts
/ TestPiAgentDir in one run each; rerun with -timeout 40m after the
rebase, internal/agent, internal/gui, internal/gateway and
internal/library all pass, and the two agent tests pass alone (-count=3).
KKKKKKKEM (#1397): omp 18.x runs plan mode, images and the advisor on
roles of their own that don't follow the default model, and magpie
offered no way to set them; then, setting slow, they asked to set its
thinking level too (slow at high while sessions start at medium).
omp reads a role's thinking level off the end of its model, "model:level"
(splitThinkingSuffix / parseModelPattern in model-resolver.ts, with
:auto and :max allowed for role values). magpie now has:
- plan, vision and advisor beside subagents, smol and slow (all written
under modelRoles in ~/.omp/agent/config.yml as before);
- a "<role> thinking" field for each of them: the level rewrites the
role's value through the role's own Set, so magpie's provider prefix
and the stash are kept. Offered while the role is one model (auto,
off, minimal…max); a role left unset or set to a list says to pick its
model first, and an unknown level is refused. Unset, the role runs at
the session's level.
In the GUI the roles move into the tiers square ("roles") with each
role's level in its menu; unset roles say what omp does instead (the
advisor: the slow role's model, else omp's own pick). The same holds
for a named profile (omp#<name>) and omp in a WSL distro: ompAgent now
matches those ids, so their rows don't list the roles as loose fields.
New strings in zh, zh-TW, ja and de.
Tests:
- TestOmpRoleThinking (Go): level read and written for each role,
provider prefix kept, unset and list roles refused, unknown level
refused, clearing the level leaves the model.
- omp-roles.test.cjs: the roles square, a role's level picked and
written, and an omp#work profile row drawn the same way. Broken by
hand (ompAgent on the bare id), the profile case goes red.