diff options
| author | adamelmore <[email protected]> | 2026-01-26 19:57:34 -0600 |
|---|---|---|
| committer | adamelmore <[email protected]> | 2026-01-26 20:07:47 -0600 |
| commit | a8c18dba8205d7707a46ec0859db672370be8963 (patch) | |
| tree | f3fec0ffabe3119732a76032a022d05aec7f1ad1 /packages/plugin | |
| parent | 6cf2c3e3db629757bcace9528b0c84f107bf73a7 (diff) | |
| download | opencode-a8c18dba8205d7707a46ec0859db672370be8963.tar.gz opencode-a8c18dba8205d7707a46ec0859db672370be8963.zip | |
fix(core): expose Instance.directory to custom tools
Diffstat (limited to 'packages/plugin')
| -rw-r--r-- | packages/plugin/src/tool.ts | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/packages/plugin/src/tool.ts b/packages/plugin/src/tool.ts index f759c07d2..6b4f7f1d1 100644 --- a/packages/plugin/src/tool.ts +++ b/packages/plugin/src/tool.ts @@ -4,6 +4,11 @@ export type ToolContext = { sessionID: string messageID: string agent: string + /** + * Current project directory for this session. + * Prefer this over process.cwd() when resolving relative paths. + */ + directory: string abort: AbortSignal metadata(input: { title?: string; metadata?: { [key: string]: any } }): void ask(input: AskInput): Promise<void> |
