Add Dim and Kimi Code to the agent roster and Install > AI

Both install through the lazy mise wrappers (npm:dimcode and
npm:@moonshot-ai/kimi-code), preinstalled on new machines and migrated onto
existing ones unless preinstalls were removed, and each gets a menu entry in
both places: under Setup > Defaults > Agent as a default-agent choice, and
under Install > AI for installing without changing the default. The launch
spellings come from each CLI's actual flags — bare dim is the TUI and `dim
exec` the one-shot, kimi runs full-auto as `kimi --auto` with `--prompt` as
its one-shot. The Install > AI entries are guarded by `mise where`, since the
preinstalled stub would otherwise read as installed. The menu marks are the
Kimi simpleicon and Dim's traced from its app icon, since upstream publishes
no monochrome SVG.
This commit is contained in:
ZacharyZhang-NY committed 2026-08-31 23:13:42 -04:00
1 parent 943d2fcbe9
commit 4505badecb
11 files changed
+65 -7

No files matched your search

+24 -1
View File
@@ -98,6 +98,8 @@ omp_package="github:can1357/oh-my-pi"
crush_package="crush"
agy_package="antigravity-cli"
ori_package="github:OpenRouterLabs/ori-releases"
dim_package="npm:dimcode"
kimi_package="npm:@moonshot-ai/kimi-code"
assert_lazy_stub() {
local package=$1
@@ -116,6 +118,8 @@ assert_lazy_stub "$grok_package" grok
assert_lazy_stub "$omp_package" omp
assert_lazy_stub "$crush_package" crush
assert_lazy_stub "$ori_package" ori
assert_lazy_stub "$dim_package" dim
assert_lazy_stub "$kimi_package" kimi
pass "custom agent lazy stubs preserve their mise packages"
source "$ROOT/install/user/mise.sh"
@@ -124,6 +128,8 @@ grep -Fx "$grok_package grok" "$stub_log" >/dev/null || fail "user setup creates
grep -Fx "$omp_package omp" "$stub_log" >/dev/null || fail "user setup creates the Oh My Pi lazy stub"
grep -Fx "$crush_package" "$stub_log" >/dev/null || fail "user setup creates the Crush lazy stub"
grep -Fx "$ori_package ori" "$stub_log" >/dev/null || fail "user setup creates the Ori lazy stub"
grep -Fx "$dim_package dim" "$stub_log" >/dev/null || fail "user setup creates the Dim Agent lazy stub"
grep -Fx "$kimi_package kimi" "$stub_log" >/dev/null || fail "user setup creates the Kimi Code lazy stub"
pass "user setup creates the custom agent lazy stubs"
: >"$stub_log"
@@ -134,6 +140,11 @@ grep -Fx "$omp_package omp" "$stub_log" >/dev/null || fail "Oh My Pi migration c
source "$ROOT/migrations/1787342993.sh" >/dev/null
grep -Fx "$ori_package ori" "$stub_log" >/dev/null || fail "Ori migration creates a working lazy stub"
: >"$stub_log"
source "$ROOT/migrations/1788204288.sh" >/dev/null
grep -Fx "$dim_package dim" "$stub_log" >/dev/null || fail "agent migration creates the Dim Agent lazy stub"
grep -Fx "$kimi_package kimi" "$stub_log" >/dev/null || fail "agent migration creates the Kimi Code lazy stub"
: >"$stub_log"
source "$ROOT/migrations/1785846769.sh" >/dev/null
grep -Fx "$omp_package omp" "$stub_log" >/dev/null || fail "agent migration repairs the Oh My Pi lazy stub"
@@ -216,6 +227,7 @@ touch "$test_home/.local/state/omarchy/preinstalls-removed"
source "$ROOT/migrations/1785617047.sh" >/dev/null
source "$ROOT/migrations/1785846769.sh" >/dev/null
source "$ROOT/migrations/1787342993.sh" >/dev/null
source "$ROOT/migrations/1788204288.sh" >/dev/null
[[ ! -s $stub_log ]] || fail "agent migrations respect the preinstall opt-out"
[[ ! -e $test_home/.local/bin/omp ]] || fail "agent migration removes the obsolete Oh My Pi wrapper after opt-out"
@@ -242,7 +254,7 @@ pass "agent migrations install working wrappers without overriding the preinstal
touch "$test_home/.local/bin/agy" "$test_home/.local/bin/ori"
omarchy-remove-preinstalls >/dev/null
for command in agy omp ori grok crush; do
for command in agy omp ori grok crush dim kimi; do
[[ ! -e $test_home/.local/bin/$command ]] || fail "Remove Preinstalls deletes the $command lazy stub"
done
pass "Remove Preinstalls deletes every optional agent lazy stub"
@@ -299,7 +311,12 @@ declare -A expected_agents=(
[claude-code]="claude"
[codex]="codex"
[crush]="crush"
[dim]="dim"
[dimcode]="dim"
[dim-agent]="dim"
[grok]="grok"
[kimi]="kimi"
[kimi-code]="kimi"
[agy]="agy"
[antigravity]="agy"
[antigravity-cli]="agy"
@@ -317,7 +334,9 @@ declare -A expected_packages=(
[claude]="claude"
[codex]="codex"
[crush]="$crush_package"
[dim]="$dim_package"
[grok]="$grok_package"
[kimi]="$kimi_package"
[agy]="$agy_package"
[copilot]="copilot"
)
@@ -461,7 +480,9 @@ assert_launch ori ori code --interactive --prompt "Review this project"
assert_launch claude claude --permission-mode auto -- "Review this project"
assert_launch codex codex --approve-for-me -- "Review this project"
assert_launch crush crush run "Review this project"
assert_launch dim dim exec "Review this project"
assert_launch grok grok --permission-mode bypassPermissions -- "Review this project"
assert_launch kimi kimi --auto --prompt "Review this project"
assert_launch agy agy --dangerously-skip-permissions --prompt-interactive "Review this project"
assert_launch copilot copilot --allow-all --interactive "Review this project"
pass "agent launcher adapts initial prompts for every supported agent"
@@ -473,7 +494,9 @@ assert_bypass ori ori code
assert_bypass claude claude --permission-mode auto
assert_bypass codex codex --approve-for-me
assert_bypass crush crush --yolo
assert_bypass dim dim
assert_bypass grok grok --permission-mode bypassPermissions
assert_bypass kimi kimi --auto
assert_bypass agy agy --dangerously-skip-permissions
assert_bypass copilot copilot --allow-all
pass "agent launcher skips permission prompts for every supported agent"
+4 -2
View File
@@ -226,6 +226,8 @@ const expectedAgents = {
grok: { icon: '\ue904', iconFont: 'omarchy', label: 'Grok' },
copilot: { icon: '', label: 'Copilot' },
crush: { icon: '󰋑', label: 'Crush' },
dim: { icon: '\ue90a', iconFont: 'omarchy', label: 'Dim Agent' },
kimi: { icon: '\ue90b', iconFont: 'omarchy', label: 'Kimi Code' },
}
assert(
Object.entries(expectedAgents).every(([agent, expected]) => {
@@ -244,7 +246,7 @@ assertDeepEqual(
defaultItems
.filter(item => item.parent === 'setup.default.agent')
.map(item => item.label),
['Antigravity', 'Claude', 'Codex', 'Copilot', 'Crush', 'Grok', 'omp', 'OpenCode', 'Ori', 'Pi'],
['Antigravity', 'Claude', 'Codex', 'Copilot', 'Crush', 'Dim Agent', 'Grok', 'Kimi Code', 'omp', 'OpenCode', 'Ori', 'Pi'],
'menu sorts coding agents alphabetically'
)
const expectedDefaults = {
@@ -636,5 +638,5 @@ assert(
JS
font_charset=$(fc-query --format='%{charset}' "$ROOT/default/fonts/omarchy/omarchy.ttf")
[[ $font_charset == *"e900-e909"* ]] || fail "Omarchy icon font includes every custom menu glyph"
[[ $font_charset == *"e900-e90b"* ]] || fail "Omarchy icon font includes every custom menu glyph"
pass "Omarchy icon font includes the official agent marks"