feat: add DEFAULT_AGENT option to set agent for Slack sessions#7
Open
madejejej wants to merge 1 commit into
Open
feat: add DEFAULT_AGENT option to set agent for Slack sessions#7madejejej wants to merge 1 commit into
madejejej wants to merge 1 commit into
Conversation
Adds a new plugin option DEFAULT_AGENT (with SLACK_DEFAULT_AGENT env var fallback) that sets the initial value of agentOverride when the plugin initializes. This makes new Slack prompts use the configured agent instead of opencode's global default. Motivation: when opencode's default agent carries an identity you don't want exposed in Slack (e.g. a chat-facing persona like 'Claudia' that should not introduce itself as 'Sisyphus'), there's currently no way to pick a different agent for Slack without manually running !agent in every thread or prefixing every message with @<agent>. Behavior: - Honored at plugin init only (no per-prompt re-read) - Still overridden by !agent <name> and @<name> per-message - Still cleared by !agent reset (which sets agentOverride = null) - Parallel to existing DEFAULT_DIRECTORY / SLACK_DEFAULT_DIRECTORY pattern Builds cleanly with `npm run build` (dist/plugin.js regenerated).
There was a problem hiding this comment.
No issues found across 3 files
Shadow auto-approve: would auto-approve. Adds a new plugin option to set the default agent for Slack sessions. Follows the existing DEFAULT_DIRECTORY pattern; change is bounded and clearly beneficial.
Re-trigger cubic
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.
Adds a new plugin option DEFAULT_AGENT (with SLACK_DEFAULT_AGENT env var fallback) that sets the initial value of agentOverride when the plugin initializes. This makes new Slack prompts use the configured agent instead of opencode's global default.
Motivation: when opencode's default agent carries an identity you don't want exposed in Slack (e.g. a chat-facing persona like 'Claudia' that should not introduce itself as 'Sisyphus'), there's currently no way to pick a different agent for Slack without manually running !agent in every thread or prefixing every message with @.
Behavior:
Builds cleanly with
npm run build(dist/plugin.js regenerated).Summary by cubic
Adds a
DEFAULT_AGENTplugin option with aSLACK_DEFAULT_AGENTenv fallback to set the default agent for Slack threads. New Slack prompts now start with the configured agent instead of opencode’s global default.!agent <name>and@<agent>; cleared by!agent reset.DEFAULT_DIRECTORY/SLACK_DEFAULT_DIRECTORYbehavior.Written for commit 05cdcf1. Summary will update on new commits.