Skip to content

feat(session): add rename action to session control tool - #2471

Open
1688mengdie wants to merge 1 commit into
GCWing:mainfrom
BitFun-SIG:pr-g6-rename-rebased
Open

feat(session): add rename action to session control tool#2471
1688mengdie wants to merge 1 commit into
GCWing:mainfrom
BitFun-SIG:pr-g6-rename-rebased

Conversation

@1688mengdie

Copy link
Copy Markdown

Summary

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.

Changes

  • Extend SessionControlAction with a Rename variant and its 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.

Testing

AI-assisted output. Test extent: 已测 (tested).

  • 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_*).
  • Verified by the project maintainer on a dev instance (real rename persistence through the full session chain).

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 rename action against a persisted session on a dev instance.

Commits

  • bc73ae388 feat(session): add rename action to session control tool — extend the session control tool with a rename action reusing the upstream rename channel.

Closes #2468

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).
@GCWing
GCWing requested a review from wsp1911 August 26, 2026 02:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(session): add rename action to session control tool

1 participant