@opencode-ai/plugin 1.14.40 → 1.14.42
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 +27 -42
- package/dist/tui.js +6 -1
- package/package.json +11 -6
package/dist/tui.d.ts
CHANGED
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
import type { AgentPart, OpencodeClient, Event, FilePart, LspStatus, McpStatus, Todo, Message, Part, Provider, PermissionRequest, QuestionRequest, SessionStatus, TextPart, Config as SdkConfig } from "@opencode-ai/sdk/v2";
|
|
2
|
-
import type { CliRenderer,
|
|
2
|
+
import type { CliRenderer, KeyEvent, RGBA, Renderable, SlotMode } from "@opentui/core";
|
|
3
|
+
import type { Binding, Keymap } from "@opentui/keymap";
|
|
4
|
+
import { type BindingConfig, type CreateBindingLookupOptions, type KeySequenceFormatPart, type SequenceBindingLike } from "@opentui/keymap/extras";
|
|
3
5
|
import type { JSX, SolidPlugin } from "@opentui/solid";
|
|
4
6
|
import type { Config as PluginConfig, PluginOptions } from "./index.js";
|
|
5
|
-
export type { CliRenderer, SlotMode } from "@opentui/core";
|
|
7
|
+
export type { CliRenderer, KeyEvent, Renderable, SlotMode } from "@opentui/core";
|
|
8
|
+
export { stringifyKeySequence, stringifyKeyStroke } from "@opentui/keymap";
|
|
9
|
+
export type { Binding, KeyLike, KeySequencePart, KeyStringifyInput, StringifyOptions } from "@opentui/keymap";
|
|
10
|
+
export { formatCommandBindings, formatKeySequence } from "@opentui/keymap/extras";
|
|
11
|
+
export type { BindingConfig, BindingLookup, BindingValue, CreateBindingLookupOptions, FormatCommandBindingsOptions, FormatKeySequenceOptions, KeySequenceFormatPart, SequenceBindingLike, } from "@opentui/keymap/extras";
|
|
12
|
+
export declare function createBindingLookup(config: BindingConfig<Renderable, KeyEvent> | undefined, options?: CreateBindingLookupOptions<Renderable, KeyEvent>): import("@opentui/keymap/extras").BindingLookup<Renderable, KeyEvent>;
|
|
6
13
|
export type TuiRouteCurrent = {
|
|
7
14
|
name: "home";
|
|
8
15
|
} | {
|
|
@@ -21,36 +28,11 @@ export type TuiRouteDefinition = {
|
|
|
21
28
|
params?: Record<string, unknown>;
|
|
22
29
|
}) => JSX.Element;
|
|
23
30
|
};
|
|
24
|
-
export type
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
description?: string;
|
|
28
|
-
category?: string;
|
|
29
|
-
keybind?: string;
|
|
30
|
-
suggested?: boolean;
|
|
31
|
-
hidden?: boolean;
|
|
32
|
-
enabled?: boolean;
|
|
33
|
-
slash?: {
|
|
34
|
-
name: string;
|
|
35
|
-
aliases?: string[];
|
|
36
|
-
};
|
|
37
|
-
onSelect?: () => void;
|
|
38
|
-
};
|
|
39
|
-
export type TuiKeybind = {
|
|
40
|
-
name: string;
|
|
41
|
-
ctrl: boolean;
|
|
42
|
-
meta: boolean;
|
|
43
|
-
shift: boolean;
|
|
44
|
-
super?: boolean;
|
|
45
|
-
leader: boolean;
|
|
46
|
-
};
|
|
47
|
-
export type TuiKeybindMap = Record<string, string>;
|
|
48
|
-
export type TuiKeybindSet = {
|
|
49
|
-
readonly all: TuiKeybindMap;
|
|
50
|
-
get: (name: string) => string;
|
|
51
|
-
match: (name: string, evt: ParsedKey) => boolean;
|
|
52
|
-
print: (name: string) => string;
|
|
31
|
+
export type TuiKeys = {
|
|
32
|
+
formatSequence: (parts: readonly KeySequenceFormatPart[] | undefined) => string;
|
|
33
|
+
formatBindings: (bindings: readonly SequenceBindingLike[] | undefined) => string | undefined;
|
|
53
34
|
};
|
|
35
|
+
export type TuiKeymap = Keymap<Renderable, KeyEvent>;
|
|
54
36
|
export type TuiDialogProps = {
|
|
55
37
|
size?: "medium" | "large" | "xlarge";
|
|
56
38
|
onClose: () => void;
|
|
@@ -243,8 +225,18 @@ export type TuiState = {
|
|
|
243
225
|
lsp: () => ReadonlyArray<TuiSidebarLspItem>;
|
|
244
226
|
mcp: () => ReadonlyArray<TuiSidebarMcpItem>;
|
|
245
227
|
};
|
|
246
|
-
type
|
|
228
|
+
type TuiBindingLookupView = {
|
|
229
|
+
readonly bindings: ReadonlyArray<Binding<Renderable, KeyEvent>>;
|
|
230
|
+
get: (command: string) => ReadonlyArray<Binding<Renderable, KeyEvent>>;
|
|
231
|
+
has: (command: string) => boolean;
|
|
232
|
+
gather: (name: string, commands: readonly string[]) => ReadonlyArray<Binding<Renderable, KeyEvent>>;
|
|
233
|
+
pick: (name: string, commands: readonly string[]) => Binding<Renderable, KeyEvent>[];
|
|
234
|
+
omit: (name: string, commands: readonly string[]) => Binding<Renderable, KeyEvent>[];
|
|
235
|
+
};
|
|
236
|
+
type TuiConfigView = Pick<PluginConfig, "$schema" | "theme" | "plugin"> & NonNullable<PluginConfig["tui"]> & {
|
|
237
|
+
leader_timeout: number;
|
|
247
238
|
plugin_enabled?: Record<string, boolean>;
|
|
239
|
+
keybinds: TuiBindingLookupView;
|
|
248
240
|
};
|
|
249
241
|
export type TuiApp = {
|
|
250
242
|
readonly version: string;
|
|
@@ -266,6 +258,7 @@ export type TuiSidebarFileItem = {
|
|
|
266
258
|
};
|
|
267
259
|
export type TuiHostSlotMap = {
|
|
268
260
|
app: {};
|
|
261
|
+
app_bottom: {};
|
|
269
262
|
home_logo: {};
|
|
270
263
|
home_prompt: {
|
|
271
264
|
workspace_id?: string;
|
|
@@ -372,11 +365,8 @@ export type TuiWorkspace = {
|
|
|
372
365
|
};
|
|
373
366
|
export type TuiPluginApi = {
|
|
374
367
|
app: TuiApp;
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
trigger: (value: string) => void;
|
|
378
|
-
show: () => void;
|
|
379
|
-
};
|
|
368
|
+
keys: TuiKeys;
|
|
369
|
+
keymap: TuiKeymap;
|
|
380
370
|
route: {
|
|
381
371
|
register: (routes: TuiRouteDefinition[]) => () => void;
|
|
382
372
|
navigate: (name: string, params?: Record<string, unknown>) => void;
|
|
@@ -393,11 +383,6 @@ export type TuiPluginApi = {
|
|
|
393
383
|
toast: (input: TuiToast) => void;
|
|
394
384
|
dialog: TuiDialogStack;
|
|
395
385
|
};
|
|
396
|
-
keybind: {
|
|
397
|
-
match: (key: string, evt: ParsedKey) => boolean;
|
|
398
|
-
print: (key: string) => string;
|
|
399
|
-
create: (defaults: TuiKeybindMap, overrides?: Record<string, unknown>) => TuiKeybindSet;
|
|
400
|
-
};
|
|
401
386
|
readonly tuiConfig: Frozen<TuiConfigView>;
|
|
402
387
|
kv: TuiKV;
|
|
403
388
|
state: TuiState;
|
package/dist/tui.js
CHANGED
|
@@ -1 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import { createBindingLookup as createKeymapBindingLookup, } from "@opentui/keymap/extras";
|
|
2
|
+
export { stringifyKeySequence, stringifyKeyStroke } from "@opentui/keymap";
|
|
3
|
+
export { formatCommandBindings, formatKeySequence } from "@opentui/keymap/extras";
|
|
4
|
+
export function createBindingLookup(config, options) {
|
|
5
|
+
return createKeymapBindingLookup(config ?? {}, options);
|
|
6
|
+
}
|
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": "1.14.
|
|
4
|
+
"version": "1.14.42",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"scripts": {
|
|
@@ -26,25 +26,30 @@
|
|
|
26
26
|
"dist"
|
|
27
27
|
],
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@opencode-ai/sdk": "1.14.
|
|
29
|
+
"@opencode-ai/sdk": "1.14.42",
|
|
30
30
|
"effect": "4.0.0-beta.59",
|
|
31
31
|
"zod": "4.1.8"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
|
-
"@opentui/core": ">=0.2.
|
|
35
|
-
"@opentui/
|
|
34
|
+
"@opentui/core": ">=0.2.6",
|
|
35
|
+
"@opentui/keymap": ">=0.2.6",
|
|
36
|
+
"@opentui/solid": ">=0.2.6"
|
|
36
37
|
},
|
|
37
38
|
"peerDependenciesMeta": {
|
|
38
39
|
"@opentui/core": {
|
|
39
40
|
"optional": true
|
|
40
41
|
},
|
|
42
|
+
"@opentui/keymap": {
|
|
43
|
+
"optional": true
|
|
44
|
+
},
|
|
41
45
|
"@opentui/solid": {
|
|
42
46
|
"optional": true
|
|
43
47
|
}
|
|
44
48
|
},
|
|
45
49
|
"devDependencies": {
|
|
46
|
-
"@opentui/core": "0.2.
|
|
47
|
-
"@opentui/
|
|
50
|
+
"@opentui/core": "0.2.6",
|
|
51
|
+
"@opentui/keymap": "0.2.6",
|
|
52
|
+
"@opentui/solid": "0.2.6",
|
|
48
53
|
"@tsconfig/node22": "22.0.2",
|
|
49
54
|
"@types/node": "24.12.2",
|
|
50
55
|
"typescript": "5.8.2",
|