Skip to content

feat(desktop): surface /model in the slash palette - #330

Merged
Kyzcreig merged 1 commit into
mainfrom
feat/desktop-model-slash-v2
Jul 14, 2026
Merged

Kyzcreig merged 1 commit into
mainfrom
feat/desktop-model-slash-v2

Conversation

@Kyzcreig

Copy link
Copy Markdown
Collaborator

Un-hide /model in the desktop slash registry so it appears in the popover/completions; picking it opens the model picker overlay, typed args still exec on the backend.

Upstream PR: NousResearch#64464. Rebased onto current fork/main (post-#328 picker changes; no overlap — #328 touches picker contents, this touches palette visibility).

Tests: desktop-slash-commands 16/16, prompt-actions+model-menu 55/55, tsc clean. Live E2E proven on both Macs (CDP-driven keystrokes → popover → picker overlay).

/model was registered with hidden:true, so it never appeared in the
desktop slash popover/completions and looked broken. Un-hide it:
picking or typing /model opens the model picker overlay; a typed arg
(/model <name>) still executes on the backend as before.
@greptile-apps

greptile-apps Bot commented Jul 14, 2026

Copy link
Copy Markdown

Greptile Summary

This PR un-hides /model in the desktop slash command registry by removing hidden: true from its spec, so it now appears in the slash palette popover alongside /resume (which has always been surfaced the same way). The picker-surface dispatch behavior and typed-arg execution path are unchanged.

  • desktop-slash-commands.ts: Single-property removal — hidden: true is dropped from the /model spec; everything else (surface kind, description, execution behavior) stays identical.
  • desktop-slash-commands.test.ts: Removes the now-incorrect negative assertion that /model is hidden, and adds /model to the expected output of the filterDesktopCommandsCatalog test to reflect its new visibility.

Confidence Score: 4/5

Safe to merge — the change is a single-property removal that aligns /model with how /resume is already surfaced, with no impact on execution logic.

The production code change itself is minimal and correct. The test file removes the negative assertion but omits a direct positive assertion, and leaves a stale comment that now says the opposite of what is true. Neither issue affects runtime behavior, but they weaken the test self-documentation going forward.

The test file (desktop-slash-commands.test.ts) has a stale comment and a missing explicit positive assertion worth tidying before this pattern is copied for future commands.

Important Files Changed

Filename Overview
apps/desktop/src/lib/desktop-slash-commands.ts Removes hidden: true from the /model spec — one-property change that makes it visible in the palette, consistent with how /resume is already handled.
apps/desktop/src/lib/desktop-slash-commands.test.ts Removes the negative /model suggestion assertion and adds /model to the catalog filter expectation; missing an explicit positive isDesktopSlashSuggestion('/model') === true assertion, and leaves a stale comment implying /resume shows in the popover 'unlike /model'.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[User types /model in input] --> B{isDesktopSlashSuggestion?}
    B -- "Before PR: hidden: true → false" --> C[Not shown in palette]
    B -- "After PR: hidden removed → true" --> D[Shown in slash palette]
    D --> E{User picks /model}
    E --> F{Has typed arg?}
    F -- "e.g. /model sonnet" --> G[Picker resolves arg directly]
    F -- "bare /model" --> H[Opens model picker overlay]
    C --> I[Only reachable via status-bar chrome]
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    A[User types /model in input] --> B{isDesktopSlashSuggestion?}
    B -- "Before PR: hidden: true → false" --> C[Not shown in palette]
    B -- "After PR: hidden removed → true" --> D[Shown in slash palette]
    D --> E{User picks /model}
    E --> F{Has typed arg?}
    F -- "e.g. /model sonnet" --> G[Picker resolves arg directly]
    F -- "bare /model" --> H[Opens model picker overlay]
    C --> I[Only reachable via status-bar chrome]
Loading

Reviews (1): Last reviewed commit: "feat(desktop): surface /model in the sla..." | Re-trigger Greptile

@Kyzcreig
Kyzcreig merged commit 315b69c into main Jul 14, 2026
24 checks passed
@Kyzcreig
Kyzcreig deleted the feat/desktop-model-slash-v2 branch July 14, 2026 14:47
Kyzcreig added a commit that referenced this pull request Jul 14, 2026
…nt (Greptile P2s on #330) (#331)

Co-authored-by: Kyzcreig <9063726+Kyzcreig@users.noreply.github.com>
Kyzcreig added a commit that referenced this pull request Jul 14, 2026
… slash palette (#332)

Desktop slash UX pass (follow-up to #330):

- /reasoning (alias /effort): new first-class desktop action — bare shows the
  session's effort + display state (config.get reasoning), an arg sets it via
  the session-scoped config.set the model-edit submenu already uses; effort
  levels also update the composer store so the model pill reflects the change
  immediately. Localized (en/ja/zh/zh-hant). Was unavailable('advanced') —
  typing it dead-ended with 'not shown in the desktop palette'.
- /clear: now an alias of /new instead of unavailable('terminal') — in every
  other surface it clears + starts fresh; the desktop equivalent is a new
  chat. Previously it dumped 'only available in the terminal interface'.
- /models: alias of /model (common typo; sweep-flagged unknown-command).

Tests: registry coverage for the three new surfaces + stale /clear
expectations updated; full desktop suite 159 files / 1276 tests green; tsc
clean.

Co-authored-by: Kyzcreig <9063726+Kyzcreig@users.noreply.github.com>
Kyzcreig added a commit that referenced this pull request Jul 14, 2026
…nt (Greptile P2s on #330) (#331)

Co-authored-by: Kyzcreig <9063726+Kyzcreig@users.noreply.github.com>
Kyzcreig added a commit that referenced this pull request Jul 14, 2026
… slash palette (#332)

Desktop slash UX pass (follow-up to #330):

- /reasoning (alias /effort): new first-class desktop action — bare shows the
  session's effort + display state (config.get reasoning), an arg sets it via
  the session-scoped config.set the model-edit submenu already uses; effort
  levels also update the composer store so the model pill reflects the change
  immediately. Localized (en/ja/zh/zh-hant). Was unavailable('advanced') —
  typing it dead-ended with 'not shown in the desktop palette'.
- /clear: now an alias of /new instead of unavailable('terminal') — in every
  other surface it clears + starts fresh; the desktop equivalent is a new
  chat. Previously it dumped 'only available in the terminal interface'.
- /models: alias of /model (common typo; sweep-flagged unknown-command).

Tests: registry coverage for the three new surfaces + stale /clear
expectations updated; full desktop suite 159 files / 1276 tests green; tsc
clean.

Co-authored-by: Kyzcreig <9063726+Kyzcreig@users.noreply.github.com>
@Kyzcreig
Kyzcreig restored the feat/desktop-model-slash-v2 branch September 21, 2026 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant