@opencode-ai/plugin 0.0.0-snapshot-tui-plugins-202603242045 → 0.0.0-snapshot-tui-plugins-202603242342
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 +71 -55
- package/package.json +2 -2
package/dist/tui.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { OpencodeClient, Event, LspStatus, McpStatus, Todo } from "@opencode-ai/sdk/v2";
|
|
2
|
-
import type { CliRenderer, ParsedKey } from "@opentui/core";
|
|
1
|
+
import type { OpencodeClient, Event, LspStatus, McpStatus, Todo, Message, Provider, Config as SdkConfig } from "@opencode-ai/sdk/v2";
|
|
2
|
+
import type { CliRenderer, ParsedKey, RGBA } from "@opentui/core";
|
|
3
3
|
import type { JSX, SolidPlugin } from "@opentui/solid";
|
|
4
|
-
import type { Config, Plugin, PluginOptions } from "./index.js";
|
|
4
|
+
import type { Config as PluginConfig, Plugin, PluginOptions } from "./index.js";
|
|
5
5
|
export type { CliRenderer, SlotMode } from "@opentui/core";
|
|
6
6
|
export type TuiRouteCurrent = {
|
|
7
7
|
name: "home";
|
|
@@ -109,8 +109,63 @@ export type TuiToast = {
|
|
|
109
109
|
message: string;
|
|
110
110
|
duration?: number;
|
|
111
111
|
};
|
|
112
|
+
export type TuiThemeCurrent = {
|
|
113
|
+
readonly primary: RGBA;
|
|
114
|
+
readonly secondary: RGBA;
|
|
115
|
+
readonly accent: RGBA;
|
|
116
|
+
readonly error: RGBA;
|
|
117
|
+
readonly warning: RGBA;
|
|
118
|
+
readonly success: RGBA;
|
|
119
|
+
readonly info: RGBA;
|
|
120
|
+
readonly text: RGBA;
|
|
121
|
+
readonly textMuted: RGBA;
|
|
122
|
+
readonly selectedListItemText: RGBA;
|
|
123
|
+
readonly background: RGBA;
|
|
124
|
+
readonly backgroundPanel: RGBA;
|
|
125
|
+
readonly backgroundElement: RGBA;
|
|
126
|
+
readonly backgroundMenu: RGBA;
|
|
127
|
+
readonly border: RGBA;
|
|
128
|
+
readonly borderActive: RGBA;
|
|
129
|
+
readonly borderSubtle: RGBA;
|
|
130
|
+
readonly diffAdded: RGBA;
|
|
131
|
+
readonly diffRemoved: RGBA;
|
|
132
|
+
readonly diffContext: RGBA;
|
|
133
|
+
readonly diffHunkHeader: RGBA;
|
|
134
|
+
readonly diffHighlightAdded: RGBA;
|
|
135
|
+
readonly diffHighlightRemoved: RGBA;
|
|
136
|
+
readonly diffAddedBg: RGBA;
|
|
137
|
+
readonly diffRemovedBg: RGBA;
|
|
138
|
+
readonly diffContextBg: RGBA;
|
|
139
|
+
readonly diffLineNumber: RGBA;
|
|
140
|
+
readonly diffAddedLineNumberBg: RGBA;
|
|
141
|
+
readonly diffRemovedLineNumberBg: RGBA;
|
|
142
|
+
readonly markdownText: RGBA;
|
|
143
|
+
readonly markdownHeading: RGBA;
|
|
144
|
+
readonly markdownLink: RGBA;
|
|
145
|
+
readonly markdownLinkText: RGBA;
|
|
146
|
+
readonly markdownCode: RGBA;
|
|
147
|
+
readonly markdownBlockQuote: RGBA;
|
|
148
|
+
readonly markdownEmph: RGBA;
|
|
149
|
+
readonly markdownStrong: RGBA;
|
|
150
|
+
readonly markdownHorizontalRule: RGBA;
|
|
151
|
+
readonly markdownListItem: RGBA;
|
|
152
|
+
readonly markdownListEnumeration: RGBA;
|
|
153
|
+
readonly markdownImage: RGBA;
|
|
154
|
+
readonly markdownImageText: RGBA;
|
|
155
|
+
readonly markdownCodeBlock: RGBA;
|
|
156
|
+
readonly syntaxComment: RGBA;
|
|
157
|
+
readonly syntaxKeyword: RGBA;
|
|
158
|
+
readonly syntaxFunction: RGBA;
|
|
159
|
+
readonly syntaxVariable: RGBA;
|
|
160
|
+
readonly syntaxString: RGBA;
|
|
161
|
+
readonly syntaxNumber: RGBA;
|
|
162
|
+
readonly syntaxType: RGBA;
|
|
163
|
+
readonly syntaxOperator: RGBA;
|
|
164
|
+
readonly syntaxPunctuation: RGBA;
|
|
165
|
+
readonly thinkingOpacity: number;
|
|
166
|
+
};
|
|
112
167
|
export type TuiTheme = {
|
|
113
|
-
readonly current:
|
|
168
|
+
readonly current: TuiThemeCurrent;
|
|
114
169
|
readonly selected: string;
|
|
115
170
|
has: (name: string) => boolean;
|
|
116
171
|
set: (name: string) => boolean;
|
|
@@ -124,18 +179,27 @@ export type TuiKV = {
|
|
|
124
179
|
readonly ready: boolean;
|
|
125
180
|
};
|
|
126
181
|
export type TuiState = {
|
|
182
|
+
readonly ready: boolean;
|
|
183
|
+
readonly config: SdkConfig;
|
|
184
|
+
readonly provider: ReadonlyArray<Provider>;
|
|
127
185
|
session: {
|
|
128
186
|
diff: (sessionID: string) => ReadonlyArray<TuiSidebarFileItem>;
|
|
129
187
|
todo: (sessionID: string) => ReadonlyArray<TuiSidebarTodoItem>;
|
|
188
|
+
messages: (sessionID: string) => ReadonlyArray<Message>;
|
|
130
189
|
};
|
|
131
190
|
lsp: () => ReadonlyArray<TuiSidebarLspItem>;
|
|
132
191
|
mcp: () => ReadonlyArray<TuiSidebarMcpItem>;
|
|
133
192
|
};
|
|
134
|
-
type TuiConfigView = Pick<
|
|
193
|
+
type TuiConfigView = Pick<PluginConfig, "$schema" | "theme" | "keybinds" | "plugin"> & NonNullable<PluginConfig["tui"]>;
|
|
194
|
+
export type TuiApp = {
|
|
195
|
+
readonly version: string;
|
|
196
|
+
readonly directory: string;
|
|
197
|
+
};
|
|
135
198
|
type Frozen<Value> = Value extends (...args: never[]) => unknown ? Value : Value extends ReadonlyArray<infer Item> ? ReadonlyArray<Frozen<Item>> : Value extends object ? {
|
|
136
199
|
readonly [Key in keyof Value]: Frozen<Value[Key]>;
|
|
137
200
|
} : Value;
|
|
138
201
|
export type TuiApi = {
|
|
202
|
+
app: TuiApp;
|
|
139
203
|
command: {
|
|
140
204
|
register: (cb: () => TuiCommand[]) => () => void;
|
|
141
205
|
trigger: (value: string) => void;
|
|
@@ -189,64 +253,16 @@ export type TuiSlotMap = {
|
|
|
189
253
|
tips_hidden: boolean;
|
|
190
254
|
first_time_user: boolean;
|
|
191
255
|
};
|
|
192
|
-
sidebar_top: {
|
|
193
|
-
session_id: string;
|
|
194
|
-
};
|
|
195
256
|
sidebar_title: {
|
|
196
257
|
session_id: string;
|
|
197
258
|
title: string;
|
|
198
259
|
share_url?: string;
|
|
199
260
|
};
|
|
200
|
-
|
|
201
|
-
session_id: string;
|
|
202
|
-
tokens: number;
|
|
203
|
-
percentage: number | null;
|
|
204
|
-
cost: number;
|
|
205
|
-
};
|
|
206
|
-
sidebar_mcp: {
|
|
207
|
-
session_id: string;
|
|
208
|
-
items: TuiSidebarMcpItem[];
|
|
209
|
-
connected: number;
|
|
210
|
-
errors: number;
|
|
211
|
-
};
|
|
212
|
-
sidebar_lsp: {
|
|
213
|
-
session_id: string;
|
|
214
|
-
items: TuiSidebarLspItem[];
|
|
215
|
-
disabled: boolean;
|
|
216
|
-
};
|
|
217
|
-
sidebar_todo: {
|
|
218
|
-
session_id: string;
|
|
219
|
-
items: TuiSidebarTodoItem[];
|
|
220
|
-
};
|
|
221
|
-
sidebar_files: {
|
|
222
|
-
session_id: string;
|
|
223
|
-
items: TuiSidebarFileItem[];
|
|
224
|
-
};
|
|
225
|
-
sidebar_getting_started: {
|
|
226
|
-
session_id: string;
|
|
227
|
-
show_getting_started: boolean;
|
|
228
|
-
has_providers: boolean;
|
|
229
|
-
dismissed: boolean;
|
|
230
|
-
};
|
|
231
|
-
sidebar_directory: {
|
|
232
|
-
session_id: string;
|
|
233
|
-
directory: string;
|
|
234
|
-
directory_parent: string;
|
|
235
|
-
directory_name: string;
|
|
236
|
-
};
|
|
237
|
-
sidebar_version: {
|
|
261
|
+
sidebar_content: {
|
|
238
262
|
session_id: string;
|
|
239
|
-
version: string;
|
|
240
263
|
};
|
|
241
|
-
|
|
264
|
+
sidebar_footer: {
|
|
242
265
|
session_id: string;
|
|
243
|
-
directory: string;
|
|
244
|
-
directory_parent: string;
|
|
245
|
-
directory_name: string;
|
|
246
|
-
version: string;
|
|
247
|
-
show_getting_started: boolean;
|
|
248
|
-
has_providers: boolean;
|
|
249
|
-
dismissed: boolean;
|
|
250
266
|
};
|
|
251
267
|
};
|
|
252
268
|
export type TuiSlotContext = {
|
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-202603242342",
|
|
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-202603242342",
|
|
30
30
|
"zod": "4.1.8"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|