Skip to content

[FEATURE REQUEST] 文件:右键“文件”标签,在选定的文件夹里新建会话 - #57

Merged
Raiden-MeixElysia merged 2 commits into
ELY-Open-Source:mainfrom
lnyuyu:codex/files-folder-session
Nov 2, 2026
Merged

Raiden-MeixElysia merged 2 commits into
ELY-Open-Source:mainfrom
lnyuyu:codex/files-folder-session

Conversation

@lnyuyu

@lnyuyu lnyuyu commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor
  • [FEATURE REQUEST]:新功能或改进
  • [BUG REPORT]:修复问题
  • [Other]:文档、重构、CI、依赖或杂项

我想在任意一个已有的文件夹里开新会话,又不想为此去改“起始位置”设置,所以加了这个入口:

  • 在 设置 › 终端 里打开“文件菜单”后,右键顶部的“文件”标签,标签和文件树之间会展开一栏“选择文件夹新建会话…”,把文件树往下推,不会盖住它。
  • 点它会打开系统的文件夹选择器,选好后用当前会话的 Shell,在当前会话后面新开一个会话并切过去。原来的会话和默认起始位置都不变。
  • 再右键一次、点了这个操作、切到 Git、隐藏右栏或者关掉“文件菜单”,都会收起这一栏。
  • 取消选择就什么都不做;文件夹读不了或者会话启动失败,会弹出对话框说明原因。文件名右键菜单里原有的“在此新建会话”,失败时现在也会弹这个对话框,以前只写日志。
  • 文件树空白处右键不弹菜单;文件名上原有的右键菜单保持不变。

顶部的 Git/文件 切换仍然用 Ely 的 SegmentedControl,通过它新增的 on_context 知道右键点在哪一段,这样外观、滑块动画、键盘操作和读屏都和原来一样。这个接口在 ELY-Open-Source/Ely-GPUI-Components#10(elyterminal-0.1.1),main 上的版本是 ELY-Open-Source/Ely-GPUI-Components#11。合并之前,pin 指向上面这个 Ely PR 的提交 c2752ee;如果合并后提交号变了,我再跟着更新。

Windows 11,MSVC,Rust 1.95.0:

  • cargo fmt --check、cargo clippy --locked --all-targets -- -D warnings 通过;cargo test --locked 408 项通过(已合并最新的 main);cargo build --release --locked 通过。

  • 新增测试:workspace::folder::tests::cancellation_and_invalid_selections_never_name_a_folder 和 a_folder_keeps_its_path_and_a_missing_one_fails。

  • 手动:我在 Windows 上用 release 版试了右键“文件”标签、展开的操作栏和文件夹选择器,没有发现问题。

  • macOS 和 Linux:没有测。

  • 标题以 [FEATURE REQUEST]、[BUG REPORT] 或 [Other] 开头

  • 本地测试和构建通过(Windows)

  • 行为变化已更新文档:PRD、中英文功能说明、AGENTS.md 和验收表(TASKS.md 里的 T148 留给作者合并时勾选)

🤖 Generated with Claude Code

lnyuyu and others added 2 commits November 1, 2026 20:03
… in a chosen folder

With Files menu on, a right press on the Files tab opens a row between the tabs and the tree, Choose folder for a new session…, which pushes the tree down. It opens the system's folder chooser and starts the shown session's shell there, right after it and shown; a cancel starts nothing, and a folder that does not read, or a failed start, shows in a dialog, New session here's failure too. The tabs stay Ely's SegmentedControl through its new on_context, so the pin moves to c2752ee. The review log splits by range, as reviews-t01-t49.md did.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
… them; the acceptance row named T148, the number main gave this pull request

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@Raiden-MeixElysia
Raiden-MeixElysia merged commit abbdf17 into ELY-Open-Source:main Nov 2, 2026
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.

2 participants