@opencode-ai/plugin 0.0.0-snapshot-tui-plugins-202603250046 → 0.0.0-snapshot-tui-plugins-202603251343
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/tui.d.ts +24 -2
- package/package.json +2 -2
package/dist/tui.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { OpencodeClient, Event, LspStatus, McpStatus, Todo, Message, Provider, Config as SdkConfig } from "@opencode-ai/sdk/v2";
|
|
1
|
+
import type { OpencodeClient, Event, LspStatus, McpStatus, Todo, Message, Part, Provider, PermissionRequest, QuestionRequest, SessionStatus, Workspace, Config as SdkConfig } from "@opencode-ai/sdk/v2";
|
|
2
2
|
import type { CliRenderer, ParsedKey, RGBA } from "@opentui/core";
|
|
3
3
|
import type { JSX, SolidPlugin } from "@opentui/solid";
|
|
4
4
|
import type { Config as PluginConfig, Plugin, PluginOptions } from "./index.js";
|
|
@@ -182,19 +182,35 @@ export type TuiState = {
|
|
|
182
182
|
readonly ready: boolean;
|
|
183
183
|
readonly config: SdkConfig;
|
|
184
184
|
readonly provider: ReadonlyArray<Provider>;
|
|
185
|
+
readonly path: {
|
|
186
|
+
state: string;
|
|
187
|
+
config: string;
|
|
188
|
+
worktree: string;
|
|
189
|
+
directory: string;
|
|
190
|
+
};
|
|
191
|
+
readonly vcs: {
|
|
192
|
+
branch?: string;
|
|
193
|
+
} | undefined;
|
|
194
|
+
readonly workspace: {
|
|
195
|
+
list: () => ReadonlyArray<Workspace>;
|
|
196
|
+
get: (workspaceID: string) => Workspace | undefined;
|
|
197
|
+
};
|
|
185
198
|
session: {
|
|
186
199
|
count: () => number;
|
|
187
200
|
diff: (sessionID: string) => ReadonlyArray<TuiSidebarFileItem>;
|
|
188
201
|
todo: (sessionID: string) => ReadonlyArray<TuiSidebarTodoItem>;
|
|
189
202
|
messages: (sessionID: string) => ReadonlyArray<Message>;
|
|
203
|
+
status: (sessionID: string) => SessionStatus | undefined;
|
|
204
|
+
permission: (sessionID: string) => ReadonlyArray<PermissionRequest>;
|
|
205
|
+
question: (sessionID: string) => ReadonlyArray<QuestionRequest>;
|
|
190
206
|
};
|
|
207
|
+
part: (messageID: string) => ReadonlyArray<Part>;
|
|
191
208
|
lsp: () => ReadonlyArray<TuiSidebarLspItem>;
|
|
192
209
|
mcp: () => ReadonlyArray<TuiSidebarMcpItem>;
|
|
193
210
|
};
|
|
194
211
|
type TuiConfigView = Pick<PluginConfig, "$schema" | "theme" | "keybinds" | "plugin"> & NonNullable<PluginConfig["tui"]>;
|
|
195
212
|
export type TuiApp = {
|
|
196
213
|
readonly version: string;
|
|
197
|
-
readonly directory: string;
|
|
198
214
|
};
|
|
199
215
|
type Frozen<Value> = Value extends (...args: never[]) => unknown ? Value : Value extends ReadonlyArray<infer Item> ? ReadonlyArray<Frozen<Item>> : Value extends object ? {
|
|
200
216
|
readonly [Key in keyof Value]: Frozen<Value[Key]>;
|
|
@@ -295,8 +311,14 @@ export type TuiPluginEntry = {
|
|
|
295
311
|
export type TuiPluginMeta = TuiPluginEntry & {
|
|
296
312
|
state: TuiPluginState;
|
|
297
313
|
};
|
|
314
|
+
export type TuiWorkspace = {
|
|
315
|
+
current: () => string | undefined;
|
|
316
|
+
set: (workspaceID?: string) => void;
|
|
317
|
+
};
|
|
298
318
|
export type TuiHostPluginApi<Renderer = CliRenderer> = TuiApi & {
|
|
299
319
|
client: OpencodeClient;
|
|
320
|
+
scopedClient: (workspaceID?: string) => OpencodeClient;
|
|
321
|
+
workspace: TuiWorkspace;
|
|
300
322
|
event: TuiEventBus;
|
|
301
323
|
renderer: Renderer;
|
|
302
324
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "@opencode-ai/plugin",
|
|
4
|
-
"version": "0.0.0-snapshot-tui-plugins-
|
|
4
|
+
"version": "0.0.0-snapshot-tui-plugins-202603251343",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"scripts": {
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"dist"
|
|
27
27
|
],
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@opencode-ai/sdk": "0.0.0-snapshot-tui-plugins-
|
|
29
|
+
"@opencode-ai/sdk": "0.0.0-snapshot-tui-plugins-202603251343",
|
|
30
30
|
"zod": "4.1.8"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|