feat(session): add rename action to session control tool - #2471
Open
1688mengdie wants to merge 1 commit into
Open
feat(session): add rename action to session control tool#24711688mengdie wants to merge 1 commit into
1688mengdie wants to merge 1 commit into
Conversation
Extend the session control tool family with a rename action so a caller can rename a persisted session title through the same AgentSessionManagementPort channel used by the frontend renameChatSessionTitle. - Extend SessionControlAction with a Rename variant and as_str mapping. - Allow session_name as the required new title for rename (rejected for every other mutating action) and reject renaming the current session. - Add session_control_renamed_result_message helper for the tool result text. - Wire the Rename dispatch to reuse the upstream AgentSessionRenameRequest. - Extend the tool input schema/description and add rename validation tests. Test: cargo check -p bitfun-agent-runtime --jobs 4 EXIT 0; cargo check -p bitfun-core --jobs 4 EXIT 0; cargo test -p bitfun-agent-runtime --features agent-runtime rename --jobs 4 (7 tests pass); cargo test -p bitfun-core --features agent-runtime session_control_tool --jobs 4 (11 tests pass incl validate_rename_*). AI: lightly tested (targeted cargo check + session_control/session_control_tool unit tests).
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.
Summary
Extend the session control tool family with a
renameaction so a caller can rename a persisted session title through the sameAgentSessionManagementPortchannel used by the frontendrenameChatSessionTitle.Changes
SessionControlActionwith aRenamevariant and itsas_strmapping.session_nameas the required new title forrename(rejected for every other mutating action) and reject renaming the current session.session_control_renamed_result_messagehelper for the tool result text.Renamedispatch to reuse the upstreamAgentSessionRenameRequest.Testing
AI-assisted output. Test extent: 已测 (tested).
cargo check -p bitfun-agent-runtime --jobs 4EXIT 0.cargo check -p bitfun-core --jobs 4EXIT 0.cargo test -p bitfun-agent-runtime --features agent-runtime rename --jobs 4(7 tests pass).cargo test -p bitfun-core --features agent-runtime session_control_tool --jobs 4(11 tests pass, inclvalidate_rename_*).Skipped: no full local CI — the complete build and broad test suite are covered by the repository CI against this PR. No UI change (backend tool), so no before/after screenshots; the low-risk manual verification path is to invoke the session control tool with the
renameaction against a persisted session on a dev instance.Commits
bc73ae388feat(session): add rename action to session control tool — extend the session control tool with a rename action reusing the upstream rename channel.Closes #2468