@ampcode/plugin 0.0.0-20260428002917-g0d37d54 → 0.0.0-20260429003027-g6a41824

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.
Files changed (2) hide show
  1. package/index.d.ts +18 -3
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -387,6 +387,17 @@ declare module '@ampcode/plugin' {
387
387
  confirmButtonText?: string
388
388
  }
389
389
 
390
+ /**
391
+ * Options for the select dialog.
392
+ */
393
+ export interface PluginSelectOptions {
394
+ /** Dialog title */
395
+ title: string
396
+
397
+ /** Entries to display as choices */
398
+ options: string[]
399
+ }
400
+
390
401
  /**
391
402
  * UI capabilities provided to plugins.
392
403
  */
@@ -404,6 +415,12 @@ declare module '@ampcode/plugin' {
404
415
  * @returns true if the user confirmed, false if they cancelled.
405
416
  */
406
417
  confirm(options: PluginConfirmOptions): Promise<boolean>
418
+
419
+ /**
420
+ * Show a select dialog with user provided options.
421
+ * @returns the selected value, undefined if they cancelled
422
+ */
423
+ select(options: PluginSelectOptions): Promise<string | undefined>
407
424
  }
408
425
 
409
426
  /**
@@ -727,9 +744,7 @@ declare module '@ampcode/plugin' {
727
744
  $: ShellFunction
728
745
 
729
746
  /** Current thread context if a thread is active, undefined otherwise */
730
- thread?: {
731
- id: ThreadID
732
- }
747
+ thread?: PluginThread
733
748
  }
734
749
 
735
750
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ampcode/plugin",
3
- "version": "0.0.0-20260428002917-g0d37d54",
3
+ "version": "0.0.0-20260429003027-g6a41824",
4
4
  "description": "Amp Plugin API",
5
5
  "homepage": "https://ampcode.com/manual/plugin-api",
6
6
  "author": {