Commit e2d612c
Sisyphus Agent
fix: submit 命令使用 directory query 参数创建会话
- 根据 OpenCode SDK 类型定义,directory 应为 query 参数而非 body 参数
- 添加 Client.PostWithQuery 方法支持带 query 参数的 POST 请求
- submit 命令默认使用 os.Getwd() 获取当前工作目录
- 修复前:发送 path 参数到 body(被服务器忽略),目录始终为 /mnt/d/fe
- 修复后:发送 directory 参数到 query string,正确关联项目目录
Fixes: session directory 和 projectID 现在正确关联到当前工作目录
测试验证:
cd /mnt/d/fe/babylon3DWorld
oho session submit "测试"
# 结果:directory=/mnt/d/fe/babylon3DWorld, projectID=e87bee0e...1 parent d43acc7 commit e2d612c
2 files changed
Lines changed: 15 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
| 36 | + | |
35 | 37 | | |
36 | 38 | | |
37 | 39 | | |
38 | 40 | | |
39 | 41 | | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
44 | 45 | | |
45 | | - | |
| 46 | + | |
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
50 | | - | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
53 | 55 | | |
54 | 56 | | |
55 | 57 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
138 | 143 | | |
139 | 144 | | |
140 | 145 | | |
| |||
0 commit comments