Slack Agents support: pin QM to the top bar (agent_view) - #572
Open
16francej wants to merge 7 commits into
Open
Conversation
… titles, and viewing context Agent split-pane messages already arrive as DM thread messages, so they flow through the existing DM turn machinery unchanged. This adds the agent_view manifest feature (+assistant:write scope and the assistant_thread_started / assistant_thread_context_changed / app_context_changed events) and a small agent-pane module that layers on the native affordances: a working status while a turn runs, a thread title from the first message, and a currently-viewing note passed into the turn context. Fully backward compatible: installs whose manifest predates the feature never receive the events, and the first unavailable API response disables the pane calls for the process. Streaming is left as a marked seam. Co-Authored-By: QM <qm@ycombinator.com>
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.
Lets users pin QM to the Slack top bar (Slack Agents & AI Apps, current-generation
agent_view— not the deprecated assistant tabs) and talk to it in the split pane.What
src/slack/manifest.json+ CLI template):features.agent_view,assistant:writescope, and theassistant_thread_started,assistant_thread_context_changed,app_context_changedevents.src/slack/agent-pane.ts: tracks agent threads and viewing context; guardedassistant.threads.setStatus/setTitlecalls that feature-detect and self-disable on installs that haven't updated.events.ts): split-pane messages are ordinarymessage.imthread messages, so they dispatch through the existing DM turn machinery unchanged — same sessions, same behavior. Around dispatch we set a "thinking…" status (cleared even on silent/errored turns; a posted reply clears it natively), title the thread from its first message, and pass acurrently_viewingnote (messageapp_context→ saved thread context → user's lastapp_context_changed) into the turn's gateway context so "summarize this" works.agent-pane.tsmarks the seam (setStatusis where achat.startStreampresenter slots in).Backward compatibility
Installs whose manifest predates the feature never receive the new events, and the first
missing_scope/unavailable response disables the pane API calls for the process (one warning, then silence). No turn ever hard-fails on this path. A client withoutassistant.*methods is a no-op.Release notes
Tests
test/slack-agent-pane.test.ts(13 cases): status set/cleared incl. on dispatch failure, one-time titling, context precedence and updates, no-pane and old-client no-ops, missing_scope self-disable, manifest parity test still green. Full slack suites: 366/366;tsc --noEmitand eslint clean.Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.