@kilocode/plugin 7.3.21 → 7.3.28

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 CHANGED
@@ -1,8 +1,15 @@
1
1
  import type { AgentPart, KiloClient, Event, FilePart, LspStatus, McpStatus, Todo, Message, Part, Provider, PermissionRequest, QuestionRequest, SessionStatus, BackgroundProcessInfo, TextPart, Config as SdkConfig } from "@kilocode/sdk/v2";
2
- import type { CliRenderer, ParsedKey, RGBA, SlotMode } from "@opentui/core";
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,6 +28,16 @@ export type TuiRouteDefinition = {
21
28
  params?: Record<string, unknown>;
22
29
  }) => JSX.Element;
23
30
  };
31
+ export type TuiKeys = {
32
+ formatSequence: (parts: readonly KeySequenceFormatPart[] | undefined) => string;
33
+ formatBindings: (bindings: readonly SequenceBindingLike[] | undefined) => string | undefined;
34
+ };
35
+ export type TuiKeymap = Keymap<Renderable, KeyEvent>;
36
+ /**
37
+ * Legacy `api.command` shape kept so v1 plugins can initialize. Remove in v2.
38
+ *
39
+ * @deprecated Use `api.keymap.registerLayer({ commands, bindings })` instead.
40
+ */
24
41
  export type TuiCommand = {
25
42
  title: string;
26
43
  value: string;
@@ -34,22 +51,21 @@ export type TuiCommand = {
34
51
  name: string;
35
52
  aliases?: string[];
36
53
  };
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;
54
+ onSelect?: (dialog?: TuiDialogStack) => void | Promise<void>;
55
+ };
56
+ /**
57
+ * Legacy `api.command` API kept so v1 plugins can initialize. Remove in v2.
58
+ *
59
+ * @deprecated Use `api.keymap.registerLayer`, `api.keymap.dispatchCommand`, and
60
+ * `api.keymap.dispatchCommand("command.palette.show")` instead.
61
+ */
62
+ export type TuiCommandApi = {
63
+ /** @deprecated Use `api.keymap.registerLayer({ commands, bindings })` instead. */
64
+ register: (cb: () => TuiCommand[]) => () => void;
65
+ /** @deprecated Use `api.keymap.dispatchCommand(name)` instead. */
66
+ trigger: (value: string) => void;
67
+ /** @deprecated Use `api.keymap.dispatchCommand("command.palette.show")` instead. */
68
+ show: () => void;
53
69
  };
54
70
  export type TuiDialogProps = {
55
71
  size?: "medium" | "large" | "xlarge";
@@ -244,8 +260,18 @@ export type TuiState = {
244
260
  lsp: () => ReadonlyArray<TuiSidebarLspItem>;
245
261
  mcp: () => ReadonlyArray<TuiSidebarMcpItem>;
246
262
  };
247
- type TuiConfigView = Pick<PluginConfig, "$schema" | "theme" | "keybinds" | "plugin"> & NonNullable<PluginConfig["tui"]> & {
263
+ type TuiBindingLookupView = {
264
+ readonly bindings: ReadonlyArray<Binding<Renderable, KeyEvent>>;
265
+ get: (command: string) => ReadonlyArray<Binding<Renderable, KeyEvent>>;
266
+ has: (command: string) => boolean;
267
+ gather: (name: string, commands: readonly string[]) => ReadonlyArray<Binding<Renderable, KeyEvent>>;
268
+ pick: (name: string, commands: readonly string[]) => Binding<Renderable, KeyEvent>[];
269
+ omit: (name: string, commands: readonly string[]) => Binding<Renderable, KeyEvent>[];
270
+ };
271
+ type TuiConfigView = Pick<PluginConfig, "$schema" | "theme" | "plugin"> & NonNullable<PluginConfig["tui"]> & {
272
+ leader_timeout: number;
248
273
  plugin_enabled?: Record<string, boolean>;
274
+ keybinds: TuiBindingLookupView;
249
275
  };
250
276
  export type TuiApp = {
251
277
  readonly version: string;
@@ -268,6 +294,7 @@ export type TuiSidebarFileItem = {
268
294
  };
269
295
  export type TuiHostSlotMap = {
270
296
  app: {};
297
+ app_bottom: {};
271
298
  home_logo: {};
272
299
  home_prompt: {
273
300
  workspace_id?: string;
@@ -374,11 +401,15 @@ export type TuiWorkspace = {
374
401
  };
375
402
  export type TuiPluginApi = {
376
403
  app: TuiApp;
377
- command: {
378
- register: (cb: () => TuiCommand[]) => () => void;
379
- trigger: (value: string) => void;
380
- show: () => void;
381
- };
404
+ /**
405
+ * Legacy `api.command` API kept so v1 plugins can initialize. Remove in v2.
406
+ *
407
+ * @deprecated Use `api.keymap.registerLayer`, `api.keymap.dispatchCommand`, and
408
+ * `api.keymap.dispatchCommand("command.palette.show")` instead.
409
+ */
410
+ command?: TuiCommandApi;
411
+ keys: TuiKeys;
412
+ keymap: TuiKeymap;
382
413
  route: {
383
414
  register: (routes: TuiRouteDefinition[]) => () => void;
384
415
  navigate: (name: string, params?: Record<string, unknown>) => void;
@@ -395,11 +426,6 @@ export type TuiPluginApi = {
395
426
  toast: (input: TuiToast) => void;
396
427
  dialog: TuiDialogStack;
397
428
  };
398
- keybind: {
399
- match: (key: string, evt: ParsedKey) => boolean;
400
- print: (key: string) => string;
401
- create: (defaults: TuiKeybindMap, overrides?: Record<string, unknown>) => TuiKeybindSet;
402
- };
403
429
  readonly tuiConfig: Frozen<TuiConfigView>;
404
430
  kv: TuiKV;
405
431
  state: TuiState;
package/dist/tui.js CHANGED
@@ -1 +1,6 @@
1
- export {};
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": "@kilocode/plugin",
4
- "version": "7.3.21",
4
+ "version": "7.3.28",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "scripts": {
@@ -26,29 +26,34 @@
26
26
  "dist"
27
27
  ],
28
28
  "dependencies": {
29
- "@kilocode/sdk": "7.3.21",
29
+ "@kilocode/sdk": "7.3.28",
30
30
  "effect": "4.0.0-beta.59",
31
31
  "zod": "4.1.8"
32
32
  },
33
33
  "peerDependencies": {
34
- "@opentui/core": ">=0.2.2",
35
- "@opentui/solid": ">=0.2.2"
34
+ "@opentui/core": ">=0.2.6",
35
+ "@opentui/solid": ">=0.2.6",
36
+ "@opentui/keymap": ">=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.2",
47
- "@opentui/solid": "0.2.2",
50
+ "@opentui/core": "0.2.6",
51
+ "@opentui/solid": "0.2.6",
48
52
  "@tsconfig/node22": "22.0.2",
49
- "@types/node": "24.12.2",
53
+ "@types/node": "24.12.4",
50
54
  "typescript": "5.8.2",
51
- "@typescript/native-preview": "7.0.0-dev.20260316.1"
55
+ "@typescript/native-preview": "7.0.0-dev.20260316.1",
56
+ "@opentui/keymap": "0.2.6"
52
57
  },
53
58
  "repository": {
54
59
  "type": "git",