From 22797a7fffe475c38783e7a9c71e95ca4d27ccca Mon Sep 17 00:00:00 2001 From: onevcat Date: Sat, 13 Jun 2026 18:35:16 +0900 Subject: [PATCH] Distinguish OMP command icon --- docs/components/agent-detection.md | 7 ++++--- .../CommandIcons/OMP.imageset/Contents.json | 16 ++++++++++++++++ .../CommandIcons/OMP.imageset/OMP.svg | 1 + .../Terminal/Models/CommandIconMap.swift | 4 ++-- supacodeTests/CommandIconMapTests.swift | 4 ++-- supacodeTests/ScreenHeuristicsTests.swift | 3 ++- 6 files changed, 27 insertions(+), 8 deletions(-) create mode 100644 supacode/Assets.xcassets/CommandIcons/OMP.imageset/Contents.json create mode 100644 supacode/Assets.xcassets/CommandIcons/OMP.imageset/OMP.svg diff --git a/docs/components/agent-detection.md b/docs/components/agent-detection.md index 2e1b30ea..a4977dd4 100644 --- a/docs/components/agent-detection.md +++ b/docs/components/agent-detection.md @@ -17,9 +17,10 @@ running and what state it's in. That signal drives the ## Agents it recognizes Claude (Claude Code), Codex, Gemini, Cursor, Cline, OpenCode, GitHub Copilot, -Kimi, Droid, Amp, and Pi / Oh My Pi (`pi`, `omp`, `oh-my-pi`). Detection covers +Kimi, Droid, Amp, Pi (`pi`), and Oh My Pi (`omp`, `oh-my-pi`). Detection covers common wrappers (node, python, bun, bash, etc.) so agents launched indirectly are -still found. +still found. Oh My Pi reuses Pi-derived screen heuristics but uses its own command +icon where Prowl shows detected command icons, including terminal tabs. ## How detection works (two stages) @@ -29,7 +30,7 @@ still found. 2. **Screen heuristics.** It scans the last ~24 non-blank lines of the pane for agent-specific UI cues — e.g. "Esc to interrupt", Oh My Pi's `Working… ⟦esc⟧` loader or braille spinner status line (working), confirmation/permission prompts - (blocked), idle prompts. Each agent has its own patterns (including spinner glyphs: + (blocked), idle prompts. Each agent family has its own patterns (including spinner glyphs: braille frames, symbol cycles, Cursor's hexagons, Kimi's moon phases, etc.). To avoid flicker, detection **stabilizes**: it tolerates several consecutive diff --git a/supacode/Assets.xcassets/CommandIcons/OMP.imageset/Contents.json b/supacode/Assets.xcassets/CommandIcons/OMP.imageset/Contents.json new file mode 100644 index 00000000..74fa3e63 --- /dev/null +++ b/supacode/Assets.xcassets/CommandIcons/OMP.imageset/Contents.json @@ -0,0 +1,16 @@ +{ + "images" : [ + { + "filename" : "OMP.svg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + }, + "properties" : { + "preserves-vector-representation" : true, + "template-rendering-intent" : "template" + } +} diff --git a/supacode/Assets.xcassets/CommandIcons/OMP.imageset/OMP.svg b/supacode/Assets.xcassets/CommandIcons/OMP.imageset/OMP.svg new file mode 100644 index 00000000..71f784ed --- /dev/null +++ b/supacode/Assets.xcassets/CommandIcons/OMP.imageset/OMP.svg @@ -0,0 +1 @@ +omp diff --git a/supacode/Features/Terminal/Models/CommandIconMap.swift b/supacode/Features/Terminal/Models/CommandIconMap.swift index 7905666a..665cb00c 100644 --- a/supacode/Features/Terminal/Models/CommandIconMap.swift +++ b/supacode/Features/Terminal/Models/CommandIconMap.swift @@ -44,8 +44,8 @@ enum CommandIconMap { "gemini": TabIconSource(systemSymbol: "sparkle", assetName: "Gemini"), "kimi": TabIconSource(systemSymbol: "sparkle", assetName: "Kimi"), "opencode": TabIconSource(systemSymbol: "sparkle", assetName: "OpenCode"), - "omp": TabIconSource(systemSymbol: "sparkle", assetName: "Pi"), - "oh-my-pi": TabIconSource(systemSymbol: "sparkle", assetName: "Pi"), + "omp": TabIconSource(systemSymbol: "sparkle", assetName: "OMP"), + "oh-my-pi": TabIconSource(systemSymbol: "sparkle", assetName: "OMP"), "pi": TabIconSource(systemSymbol: "sparkle", assetName: "Pi"), // Editors / IDEs / pagers diff --git a/supacodeTests/CommandIconMapTests.swift b/supacodeTests/CommandIconMapTests.swift index 133ea4bb..1a9cd28c 100644 --- a/supacodeTests/CommandIconMapTests.swift +++ b/supacodeTests/CommandIconMapTests.swift @@ -63,8 +63,8 @@ struct CommandIconMapTests { // MARK: - Coding agents @Test func codingAgentsResolved() { - #expect(CommandIconMap.iconForFirstToken("omp")?.assetName == "Pi") - #expect(CommandIconMap.iconForFirstToken("oh-my-pi")?.assetName == "Pi") + #expect(CommandIconMap.iconForFirstToken("omp")?.assetName == "OMP") + #expect(CommandIconMap.iconForFirstToken("oh-my-pi")?.assetName == "OMP") // Sample of the coding-agent set — they all share the sparkle SF // Symbol fallback, asset names match the imageset folders. #expect(CommandIconMap.iconForFirstToken("agent")?.assetName == "Cursor") diff --git a/supacodeTests/ScreenHeuristicsTests.swift b/supacodeTests/ScreenHeuristicsTests.swift index 36532fca..633344f1 100644 --- a/supacodeTests/ScreenHeuristicsTests.swift +++ b/supacodeTests/ScreenHeuristicsTests.swift @@ -43,7 +43,8 @@ struct ScreenHeuristicsTests { #expect( DetectedAgent.pi.detectState( in: """ - After I add a failing test case, I should edit the code accordingly. It’s important to reproduce the error first, then run the Swift tests after the edits. + After I add a failing test case, I should edit the code accordingly. + It’s important to reproduce the error first, then run the Swift tests after the edits.  980  571 cache: 50K -- 2.51.2