Skip to content

fix: restore GitHub terminal execution and session handling - #1037

Closed
3316891527 wants to merge 3 commits into
AAswordman:devfrom
3316891527:fix/github-terminal-execution
Closed

3316891527 wants to merge 3 commits into
AAswordman:devfrom
3316891527:fix/github-terminal-execution

Conversation

@3316891527

@3316891527 3316891527 commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

变更说明

本 PR 重新提交已关闭的 #1018 中的 GitHub terminal 修复。原 PR 的源仓库已被删除,因此按照原 PR 的代码和提交内容,在当前 development 基线上重新建立提交。

改动范围

  • 为 terminal_exec 增加 timeout_ms 参数,默认超时 120000 毫秒。
  • 规范化会话名称,避免不同会话错误复用同一个 session。
  • 检测失效、关闭或不可用的 PTY/session,并自动重新创建一次后重试。
  • 超时和关闭失败时清理缓存的会话状态。
  • 传递真实命令退出码,并明确报告超时、派发失败和非零退出状态。
  • 同步 examples/github 源码与生成的 GitHub package bundle。
  • 补充 provider 迁移相关的 JVM 检查稳定性处理。

当前 development 基线已经包含原 PR 中 ArtifactPublishScreen 的 delegated logo 修复,因此该已存在改动没有重复包含在本 PR 中。

子模块依赖

本 PR 将 terminal 子模块从 e4442bc6 更新到 46358e46c19a51876764560978d3cab589c1e9d7。该提交对应 OperitTerminalCore#4,需要先合并或与本 PR 一起处理。

本次不修改 Linux rootfs 或 PRoot 镜像。

验证方式

  • 父仓库和 terminal core 的 git diff --check 通过。
  • 两份生成的 github.js 均通过 node --check。
  • app/src/main/assets/packages/github.js 与 examples/github.js 内容一致。
  • 已尝试运行 :app:testDebugUnitTest --tests com.ai.assistance.operit.api.chat.llmprovider.XaiProviderReasoningTest;构建被当前环境的 /root/android-sdk/build-tools/35.0.0/aidl 无法启动以及 syncSttModelAssets 网络超时阻塞,未将该结果标记为通过。

检查清单

  • 基于 AAswordman:development
  • 源分支为个人 fork 的 fix/github-terminal-execution
  • 保留 terminal core 配套 gitlink
  • 未混入翻译功能或其他无关改动
  • 完整 Android/JVM 构建:受当前环境依赖阻塞

@3316891527

Copy link
Copy Markdown
Contributor Author

我已在当前版本上完成终端功能验证:

  • 连续执行多条命令未出现卡死或无响应;
  • 不存在的目录能够快速返回错误;
  • 会话在多次切换工作目录后仍保持可用;
  • 超时命令能够按 timeout_ms 返回,并且超时后会话可以继续执行后续命令;
  • 非零退出状态能够正确传递。

结合本 PR 中的会话名称规范化、失效 session 自动重建、超时清理和退出码处理,原 GitHub terminal 卡死问题已修复,申请合并。子模块 terminal 依赖从 e4442bc6 更新至 46358e46c19a51876764560978d3cab589c1e9d7,请一并合并或先完成对应子模块变更。

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.

1 participant