Skip to content

feat(console): restore session direct path input alongside picker - #7593

Merged
zhijianma merged 1 commit into
agentscope-ai:mainfrom
Bruce-Yii:feat/session-direct-path-7588
Sep 7, 2026
Merged

zhijianma merged 1 commit into
agentscope-ai:mainfrom
Bruce-Yii:feat/session-direct-path-7588

Conversation

@Bruce-Yii

Copy link
Copy Markdown
Contributor

Fixes #7588.

What Problem This Solves

QwenPaw v2.1 allowed users to paste a working-directory path and press Enter to switch directly. During the session-scoped multi-directory refactor in #6976, the session single-path field was replaced by the bound-directory list, but the direct input capability was not migrated.

For deeply nested directories this leaves users dependent on the graphical picker even when they already have the exact path from a terminal, IDE, or file manager.

What Changes

  • Restore a direct path input above the session bound-directory list.
  • Keep the graphical picker unchanged.
  • Typing or picking a directory feeds the same pending-path state.
  • Pressing Enter on a new path makes it the primary directory while preserving existing bound directories.
  • Pressing Enter on an already-bound non-primary path promotes it to primary without duplicating it.
  • Both picker Apply and direct-path Enter commit through the existing PUT /chats/{id}/project-dirs backend path.
  • Server-side directory validation and the existing 10-directory cap remain authoritative.
  • Invalid paths do not corrupt the currently bound directory state.

Evidence

The regression was traced to #6976 (dd0c65ee), where the session single-path field was replaced by the multi-directory bound list. The PR's stated scope was multi-directory binding; it did not introduce a security/product decision forbidding typed paths. Agent scope retained its direct input, and the current backend continues to validate submitted paths with the same existing-directory checks.

Regression tests verify:

  • new typed path becomes primary and preserves existing bindings;
  • existing bound path can be promoted without duplication;
  • current-primary Enter is a no-op;
  • picker and input share pending state;
  • invalid backend responses preserve the bound list;
  • blur does not submit.

Testing

  • SessionProjectDirectory.test.tsx: 20 passed
  • project-directory focused suite: 34 passed (3 files)
  • files-workspace regression suite: 96 passed (14 files, joint run with project-directory)
  • tsc -b --noEmit: passed
  • eslint: passed
  • prettier: passed
  • git diff --check: passed

The full Vite production build did not complete within the sandbox's 300-second execution window; no build error was observed before timeout. Focused type-check/lint/test gates above passed.

Scope

Only the session project-directory Console component and its regression tests are changed. No backend API, security boundary, dependency, channel, or unrelated Console behavior changes are included.

Residual Risk

A live browser/backend visual interaction check was not performed in the sandbox. The request payload, primary-directory ordering, error behavior, and picker/input interaction are covered by automated tests.

@github-actions github-actions Bot added the first-time-contributor PR created by a first time contributor label Sep 6, 2026
@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown

Welcome to QwenPaw! 🐾

Hi @Bruce-Yii, thank you for your first Pull Request! 🎉

📋 About PR Template

To help maintainers review your PR faster, please make sure to include:

  • ✅ Description - What this PR does and why
  • ✅ Type of Change - Bug fix / Feature / Breaking change / Documentation / Refactoring
  • ✅ Component(s) Affected - Core / Console / Channels / Skills / CLI / Documentation / Tests / CI/CD / Scripts
  • ✅ Checklist:
    • Run and pass pre-commit run --all-files
    • Run and pass relevant tests (pytest or as applicable)
    • Update documentation if needed
  • ✅ Testing - How to test these changes
  • ✅ Local Verification Evidence:
    pre-commit run --all-files
    # paste summary result
    
    pytest
    # paste summary result

Complete PR information helps speed up the review process. You can edit the PR description to add these details.

🙌 Join Developer Community

Thanks so much for your contribution! We'd love to invite you to join the official QwenPaw developer group! You can find the Discord and DingTalk group links under the "Developer Community" section on our docs page:
https://qwenpaw.agentscope.io/docs/community

We truly appreciate your enthusiasm—and look forward to your future contributions! 😊

We'll review your PR soon.


Tip

⭐ If you find QwenPaw useful, please give us a Star!

Star QwenPaw

Staying ahead

Star QwenPaw on GitHub and be instantly notified of new releases.

Your star helps more developers discover this project! 🐾

@zhijianma
zhijianma merged commit 1cfaad4 into agentscope-ai:main Sep 7, 2026
24 of 25 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in QwenPaw Sep 7, 2026
@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown

Welcome to QwenPaw! 🎉

Thank you @Bruce-Yii for your first contribution! Your PR has been merged. 🚀

We'd love to give you a shout-out in our release notes! If you're comfortable sharing, please reply to this comment with your social media handles using the format below:

discord: your_discord_handle
x: your_x_handle
xiaohongshu: your_xiaohongshu_id

Note: Only share what you're comfortable with — all fields are optional.

Thanks again for helping make QwenPaw better!

This branch is waiting to be deployed

1 waiting deployment
ai-review-approved — bf87d24e Waiting Sep 6, 2026 by Bruce-Yii via AI Review Approval #3599
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

first-time-contributor PR created by a first time contributor

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[Question]: 工作目录选择非常麻烦 [Feature]: 恢复 v2.1.0 的主工作目录切换功能

3 participants