Repository navigation
feat(infinity-slack-bot): "Switch model" message shortcut for per-thread model switching - #163
Draft
akainth015 wants to merge 1 commit into
Draft
akainth015 wants to merge 1 commit into
akainth015 wants to merge 1 commit into
Conversation
Deploying infinity with
|
| Latest commit: |
a97503d
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://640fa6a8.infinity-dc7.pages.dev |
| Branch Preview URL: | https://pr-slack-switch-model.infinity-dc7.pages.dev |
akainth015
force-pushed
the
pr/slack-switch-model
branch
from
October 19, 2026 19:25
14f67b7 to
ac74d0a
Compare
akainth015
force-pushed
the
pr/slack-input-finalize
branch
2 times, most recently
from
October 19, 2026 20:31
360cb20 to
88f7f96
Compare
akainth015
force-pushed
the
pr/slack-switch-model
branch
from
October 19, 2026 20:31
ac74d0a to
b7c31df
Compare
akainth015
force-pushed
the
pr/slack-input-finalize
branch
from
October 19, 2026 23:51
88f7f96 to
b775713
Compare
akainth015
force-pushed
the
pr/slack-switch-model
branch
from
October 19, 2026 23:51
b7c31df to
3957e95
Compare
akainth015
force-pushed
the
pr/slack-input-finalize
branch
from
October 20, 2026 00:17
b775713 to
9935fad
Compare
akainth015
force-pushed
the
pr/slack-switch-model
branch
from
October 20, 2026 00:17
3957e95 to
e9273af
Compare
akainth015
marked this pull request as draft
October 20, 2026 02:52
akainth015
force-pushed
the
pr/slack-switch-model
branch
from
October 20, 2026 17:42
e9273af to
e207160
Compare
akainth015
force-pushed
the
pr/slack-input-finalize
branch
from
October 20, 2026 17:42
9935fad to
66e5fea
Compare
…ead model switching Slack never delivers slash commands from inside message threads, so per-thread model switching rides the context ⋮ menu instead of `/model`: * New `switch_model` message shortcut → a thread-scoped model-picker modal (shared option-building with the `/model` picker; distinct `thread_model_submit` callback so both flows coexist). The thread picker does not preselect anything: the bot doesn't track each thread's current model, and preselecting the session default would mislead after a prior switch. * Submission → new `DaemonCommand::SwitchModel` → `ClientMessage::SwitchModel` (per-thread; already supported by daemons on main, so this works against the currently running daemon). Invoked in the root conversation thread it switches the session root; invoked inside a subagent's dedicated thread it switches that subagent's agent thread (via `subagent_routes`). The channel-level `/model` default-switch behavior is unchanged. * The daemon's `ModelSwitched` broadcast now posts a "🧠 Model switched" note in the right Slack thread (incl. switches made from other clients), routed into subagent threads when applicable. * Friendly ephemeral errors: no session, no models known yet, no trigger id. * Manifest + docs updated (user action: add the `switch_model` shortcut in app settings; manifests replace, don't merge). Validation: fmt, clippy -D warnings, 80 tests green (2 new parse unit tests, 2 new flow unit tests, 2 new sim tests).
akainth015
force-pushed
the
pr/slack-switch-model
branch
from
October 22, 2026 01:18
e207160 to
a97503d
Compare
akainth015
force-pushed
the
pr/slack-input-finalize
branch
from
October 22, 2026 01:18
66e5fea to
51fe4cf
Compare
akainth015
added a commit
to hydro-project/infinity-slack
that referenced
this pull request
Oct 29, 2026
…ead model switching Slack never delivers slash commands from inside message threads, so per-thread model switching rides the context ⋮ menu instead of `/model`: * New `switch_model` message shortcut → a thread-scoped model-picker modal (shared option-building with the `/model` picker; distinct `thread_model_submit` callback so both flows coexist). The thread picker does not preselect anything: the bot doesn't track each thread's current model, and preselecting the session default would mislead after a prior switch. * Submission → new `DaemonCommand::SwitchModel` → `ClientMessage::SwitchModel` (per-thread; already supported by the pinned protocol and current daemons). Invoked in the root conversation thread it switches the session root; invoked inside a subagent's dedicated thread it switches that subagent's agent thread (via `subagent_routes`). The channel-level `/model` default-switch behavior is unchanged. * The daemon's `ModelSwitched` broadcast now posts a "🧠 Model switched" note in the right Slack thread (incl. switches made from other clients), routed into subagent threads when applicable. * Friendly ephemeral errors: no session, no models known yet, no trigger id. * Manifest + docs updated (user action: add the `switch_model` shortcut in app settings; manifests replace, don't merge). Tests: 2 new parse unit tests, 2 new flow unit tests, 2 new sim tests. Ported from hydro-project/infinity#163.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Slack rejects slash commands inside threads, so per-thread model switching ships as a message shortcut (
switch_model): ⋮ menu on any message → thread-scoped picker modal →ClientMessage::SwitchModeltargeting that thread's session (root, or the subagent's own agent thread when invoked inside a dedicated subagent thread).ModelSwitchedbroadcasts post a '🧠 Model switched…' note in the right thread. The channel-level/model(default for new sessions) is unchanged; the picker builder is shared, not duplicated. Works against the current daemon (SwitchModel is an old protocol variant). Requires adding the shortcut in Slack app settings (docs manifest updated). 80 tests green.Tail of the Slack stack (on #160).