Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

[feat] pi-tui: add PLAN_MODE_BLOCKED errorCode + Windows step wrapper

未关闭
#113 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
62/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃

调研方向

Trace the pi-tui tool deny path through PiChat.authorizeToolCall and runTurn to see how preset and tool_end data are produced. Then inspect package.json and add the scripts/run-step.mjs wrapper; done means plan-mode denials expose PLAN_MODE_BLOCKED and Windows pnpm step and step:fresh start the TUI with Bun or Node.

由索引模型根据 Issue 内容生成。

描述

area/tui enhancement status/needs-triage type/feat
问题场景(这是为了解决什么问题?)

当前 pi-tui 前端在 plan mode 下拦截写/执行工具时,只返回纯文本拒绝原因,前端无法区分「工具不存在」和「当前模式不允许」。同时 Windows 上 pnpm step 启动 TUI 需要手动处理 Bun/Node 检测,启动门槛高。

期望行为(你希望的方案)
  • 在 pi-tui 的 tool deny 路径增加结构化 errorCode: 'PLAN_MODE_BLOCKED'
  • PiChat.authorizeToolCall 在 plan mode 下返回该 errorCode
  • runTurn 将 errorCode 透传进 preset 与 tool_end 事件
  • 补上 scripts/run-step.mjs,Windows 自动检测 Bun/Node 启动 TUI
  • package.json 增加 step / step:fresh 脚本
已经考虑过的替代方案
  • 仅在 content 文本里嵌入错误码标识:不够结构化,前端解析脆弱
  • 保持纯文本拒绝,Windows wrapper 留给用户手动配置:体验差,不利于推广 step-code 风格终端渲染
相关 issue / PR(可选)

No response

主要语言
TypeScript
星标
850
派生
62
平均合并
1 天 12 小时
30 天内合并 PR
43

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

stepfun-ai/Step-Code 的其他 Issue

查看 stepfun-ai/Step-Code 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。