Skip to content

feat: Make shell configurable via config file - #23

Merged
adamdotdevin merged 2 commits into
anomalyco:devfrom
mark3labs:make-shell-configurable
May 16, 2025
Merged

feat: Make shell configurable via config file#23
adamdotdevin merged 2 commits into
anomalyco:devfrom
mark3labs:make-shell-configurable

Conversation

@ezynda3

Copy link
Copy Markdown
Contributor

Summary

  • Add ability to configure the shell used by the bash tool via the config file
  • Default to $SHELL environment variable if not specified in config
  • Fall back to /bin/bash if neither config nor environment variable is set
  • Allow customizing shell arguments

This is needed because I use nushell as my default shell on NixOS and need to specify a very specific path for bash.

Test plan

  • Verify that shell configuration works with different shells
  • Verify that shell arguments can be customized
  • Verify backward compatibility with existing behavior

ezynda3and others added 2 commits May 16, 2025 14:19
- Add ability to configure the shell used by the bash tool via the config file
- Default to $SHELL environment variable if not specified in config
- Fall back to /bin/bash if neither config nor environment variable is set
- Allow customizing shell arguments
🤖 Generated with opencode
Co-Authored-By: opencode <noreply@opencode.ai>
@adamdotdevin
adamdotdevin merged commit 4a444e9 into anomalyco:devMay 16, 2025
rekram1-node pushed a commit that referenced this pull request Nov 26, 2025
Co-authored-by: Github Action <action@github.com>
github-actionsBot pushed a commit to yuguorui/opencode that referenced this pull request Jan 18, 2026
Co-authored-by: Github Action <action@github.com>
andreipromarketing-dev pushed a commit to andreipromarketing-dev/opencode that referenced this pull request Apr 7, 2026
Adds Shorthand Guide as .md - partially addresses anomalyco#23
andreipromarketing-dev pushed a commit to andreipromarketing-dev/opencode that referenced this pull request Apr 7, 2026
xywsxp pushed a commit to xywsxp/opencode that referenced this pull request Apr 24, 2026
xywsxp pushed a commit to xywsxp/opencode that referenced this pull request Apr 24, 2026
Co-authored-by: Github Action <action@github.com>
Rwanbt referenced this pull request in Rwanbt/unifia May 5, 2026
Co-authored-by: Github Action <action@github.com>
bussard76 pushed a commit to bussard76/openwork that referenced this pull request May 12, 2026
AIALRA-0 pushed a commit to AIALRA-0/opencode-turn-engine that referenced this pull request Jun 10, 2026
Co-authored-by: Github Action <action@github.com>
AIALRA-0 pushed a commit to AIALRA-0/opencode-turn-engine that referenced this pull request Jun 10, 2026
Co-authored-by: Github Action <action@github.com>
avion23 pushed a commit to avion23/opencode that referenced this pull request Jun 10, 2026
avion23 pushed a commit to avion23/opencode that referenced this pull request Jun 10, 2026
Co-authored-by: Github Action <action@github.com>
Rwanbt referenced this pull request in Rwanbt/unifia Jun 14, 2026
Co-authored-by: Github Action <action@github.com>
danzeroum referenced this pull request in danzeroum/opencode Jun 16, 2026
PR #23: GET /project/current (project.current, group `project`) → single Project,
proving a non-PK lookup pattern (by directory/worktree context).
- Resolves `directory` (param or cwd) → git worktree via opencode_tools::git::root,
then ProjectStore::get_by_worktree (SELECT WHERE worktree = ?). Reuses the
existing Project schema (no new proto types). Unknown worktree → 400
BadRequestError. TS remote-id derivation + non-repo "global" fallback are
documented follow-ups.
- opencode-db: ProjectStore gains get_by_worktree (Sqlx + Memory).
- Gated by OPENCODE_RUST_ROUTES=project; xtask enforces /project/current.
Chosen over session.children (which needs the full heavy V1 Session schema —
PermissionRuleset/SnapshotFileDiff/free-form metadata — for a one-line filter).
Verified: build/clippy -D warnings/fmt/test (db 25, server 32) and openapi-diff
all green. No new external crates.
https://claude.ai/code/session_017Lo2jkGdTgRvsPG6tcwEqz
MarsQiu007 referenced this pull request in MarsQiu007/openNovel Jul 31, 2026
Co-authored-by: Github Action <action@github.com>
zoulukuang added a commit to zoulukuang/deskfox that referenced this pull request Aug 14, 2026
…lkit]
- anomalyco#15 文件树 tab:前提是**先有打开的会话**,否则整条 tab 不渲染。脚本改为自己补前提
(没有就点「新建会话」),而不是记 SKIP 让人误以为验过了。指标改用结构化的
`data-tree-path` 列表:全量 14 项 → 更改 3 项,tab 标「2 更改」与 2 个改动文件吻合,
切回后全量树恢复(`code/` 保持展开导致条目数变多,是展开态记忆,不是缺陷)。
- anomalyco#21:**条目本身写错了**,不是功能缺陷。`Notifications (alt+T)` 追到 node_modules
确认是第三方库 `solid-sonner` 的 Toaster 无障碍标签,alt+T 只是把焦点移到 toast 列表,
没有「面板」可开,零 toast 时 height=0 正常。按原条目测只会得到「入口在但打不开」的假缺陷。
改为验 toast 容器就位;toast 真正弹出留到第 3 组 anomalyco#23(归档撤销)验。
- CHECKLIST 新增 §三之二「条目本身也会错」:枚举法保证「不漏」但保证不了「不多」——
机器列出的入口里混着不属于产品的东西。反复得到「元素在、行为对不上」时,
先怀疑条目写错,去源码/依赖确认这个入口属于谁,再决定改代码还是改清单;
改清单必须写明为什么,否则下次照着错的再列一遍。
- 同步登记本次 sync 的执行记录(4-verification-checklist.md),含本轮两处
「工具/清单自身有错」的复盘。
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Wut6R6htBzR8fBN8gbJkWg
zoulukuang added a commit to zoulukuang/deskfox that referenced this pull request Aug 14, 2026
…-diff: 单个新文件 1089 行,是一份不可拆的执行脚本,拆开反而破坏可读性]
新增 `run_group3.py`,覆盖 anomalyco#23~anomalyco#39。通过 13、跳过 2(分叉需非空会话 / 分享需授权)、
待处理 2(复制回读、步骤收起),逐条判据与踩坑见文件内注释。
## 三条本组特有的纪律(写进文件头)
1. **只在自建测试项目里跑**:含归档/删除/分享,开跑前硬断言项目路径,不符即整体中止。
2. **不烧额度也要有真实内容**:anomalyco#39 用 Shell 模式跑 `sleep` 造出真实「执行中」状态。
3. **取材要落在被测功能的定义域内**:先拿 shell 命令当语料验 ⌘F 得 0/0,读源码才知道
会话内查找(REQ-097)只索引 user/assistant 的 text part,0/0 是**正确行为**。
## 被实测推翻的「想当然」(每条都曾让我误判成缺陷)
- Shell 模式**不是开关**:`mod+shift+x` 只进入,退出是 `mod+shift+e`(源码 disabled 条件为证)。
- 会话条目是 `<a href>`,没有 `data-session-id`;标题会重名也会被自动改名,不能当身份。
- 命令面板结果是普通 `button`,没有 `role=option` —— 按 ARIA 找恒为空,
「撤销/重做/压缩/分叉/导出」曾一起被报成「命令不存在」。
- 「分叉」的界面命令名是**「从消息创建新会话」**,且它先开选消息对话框,不直接建会话。
- 「导出」不开原生保存面板,而是下载 + 成功 toast。
- `session.*` 命令一律 `disabled: !params.id`:**没有打开的会话**时它们根本不出现 ——
前提塌了会让五六个功能一起看起来是坏的,故每项开跑前都自愈这个前提。
- 空会话在有内容前不进列表,按「新建后列表 +1」断言会把正常行为判成失败。
## 两次「产生对外状态却没收干净」(最严重的一次失误)
分享测试把会话发布到站外,而我的收回判据错了两轮:
① 用右键菜单收回,但当时会话列表被挤到视口外,菜单没打开,脚本记了个 None 就过去了;
② 改走命令面板、用「面板里不再有取消分享」当判据 —— 它只反映**当前打开的那条会话**,
于是又报「已收回」,**curl 一测链接还是活的**(页面里赫然是测试语料)。
两次都是人工核查才发现并收回;事后审计发现累计有 3 条会话处于分享态,已全部收回并 curl 复核。
**判据改成只认站外实测**(`share_url_live()` 用 curl 拉页面找特征词),收不回就大声报错。
`ALLOW_SHARE` 恢复默认 False:user 的授权是一次性、针对样本数据的,
不能固化成「每跑一次全组就自动往站外发一次」。
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Wut6R6htBzR8fBN8gbJkWg
Sign up for freeto 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

@ezynda3@adamdotdevin