opencode-interrupt-plugin 0.4.29 → 0.4.30

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/index.d.ts CHANGED
@@ -1,7 +1,5 @@
1
1
  import type { Plugin } from '@opencode-ai/plugin';
2
- import type { TuiPlugin } from '@opencode-ai/plugin/tui';
3
2
  import { type PluginConfig } from './config.js';
4
3
  export declare const InterruptPlugin: (userConfig?: PluginConfig) => Plugin;
5
- export declare const tui: TuiPlugin;
6
4
  declare const _default: Plugin;
7
5
  export default _default;
package/dist/index.js CHANGED
@@ -443,55 +443,4 @@ function extractText(parts) {
443
443
  return '';
444
444
  }
445
445
  }
446
- export const tui = async (api, _options, _meta) => {
447
- console.log("[interrupt] TUI plugin initializing");
448
- try {
449
- api.keymap.registerLayer({
450
- priority: 0,
451
- commands: [
452
- {
453
- name: "interrupt.ptt",
454
- title: "Walkie-Talkie (insert to record, press again to send)",
455
- category: "Plugin",
456
- run: async () => {
457
- console.log("[interrupt] Command interrupt.ptt executed");
458
- const route = api.route.current;
459
- const sessionID = route.name === "session"
460
- ? route.params?.sessionID
461
- : undefined;
462
- const directory = api.state.path.directory;
463
- if (pttActive) {
464
- pttActive = false;
465
- await transcribeAndSend(sessionID, directory, api);
466
- }
467
- else {
468
- pttActive = true;
469
- if (sessionID) {
470
- try {
471
- await api.client.session.abort({ sessionID, directory });
472
- }
473
- catch { /* ignore */ }
474
- }
475
- pttStartRecording();
476
- api.ui.toast({ variant: "info", title: "PTT", message: "Recording... (insert again to send)" });
477
- }
478
- },
479
- },
480
- ],
481
- bindings: [{ key: "insert", cmd: "interrupt.ptt" }],
482
- });
483
- console.log("[interrupt] Layer registered successfully");
484
- }
485
- catch (err) {
486
- console.error("[interrupt] Failed to register layer:", err);
487
- }
488
- api.lifecycle.onDispose(() => {
489
- console.log("[interrupt] TUI plugin disposed");
490
- if (recordingProcess) {
491
- recordingProcess.kill("SIGTERM");
492
- recordingProcess = null;
493
- }
494
- pttActive = false;
495
- });
496
- };
497
446
  export default InterruptPlugin();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-interrupt-plugin",
3
- "version": "0.4.29",
3
+ "version": "0.4.30",
4
4
  "description": "Streaming TTS + voice interruption for OpenCode. Speaks responses as they arrive and detects when you talk over it.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",