feat: implement session context switching via /session command#335
Open
Tuzfucius wants to merge 10 commits intosipeed:mainfrom
Open
feat: implement session context switching via /session command#335Tuzfucius wants to merge 10 commits intosipeed:mainfrom
Tuzfucius wants to merge 10 commits intosipeed:mainfrom
Conversation
- Create `pkg/command` package to host command interfaces and registry. - Implement `Command` and `Registry` interfaces for extensible command parsing. - Move basic commands (`/show`, `/list`, `/switch`) and add `/start`, `/help` to `pkg/command/basic.go`. - Update `AgentLoop` to use `command.Registry` instead of hardcoded switch-case logic. - Inject `ChannelManager` into `AgentLoop` to support channel-related commands. - Resolve code duplication in `pkg/agent/loop.go`. - Refactor Telegram channel to use the generic command system, removing duplicated command handling logic from `pkg/channels/telegram.go` and deleting `pkg/channels/telegram_commands.go`.
- Add SessionCommand with subcommands: `new`, `switch`, `ls`, `remove` - Implement persistent user-session mapping in `state.Manager` - Update SessionManager to support listing and deleting session files - Update AgentLoop to dynamically resolve session keys based on active user context - Enable isolated conversation contexts per user across all channels
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.
Description
This PR introduces the ability for users to maintain and seamlessly switch between multiple isolated conversation contexts.
It builds upon the slash command infrastructure introduced in my previous PR (#182) and addresses the feature request discussed in #162.
new,switch,ls,removestate.ManagerRelated Issues