Get a workspace file diff
Proxy the unified diff of one workspace path live from the owning daemon. scope=staged compares the index against HEAD; the default unstaged compares the worktree against the index. Pass sessionId for an authorized isolated session worktree. A binary change (binary:true), a path with no changes (diff:null) and a from-scratch workspace (isRepo:false) are all data, not errors; the daemon bounds the text to the wire frame cap and reports truncated. 503 when unplaced or the daemon is offline. Pass repo (owner/repo) to address one of the agent’s authorized additional repositories instead of its primary workspace; an unauthorized name reads 404, and a daemon too old to scope by repository yields 409.
授权
bearerAuth 位置: header
路径参数
查询参数
1 <= length <= 2561 <= length1 <= length <= 4096"unstaged"值于
- "unstaged"
- "staged"
响应主体
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/v1/orgs/string/agents/string/workspace/gitdiff?path=string"{ "path": "string", "isRepo": true, "exists": true, "diff": "string", "binary": true, "truncated": true}