pi-ui-extend 0.1.71 → 0.1.72

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/app/app.d.ts CHANGED
@@ -62,6 +62,7 @@ export declare class PiUiExtendApp {
62
62
  private subagentsPanelExpanded;
63
63
  private allThinkingExpanded;
64
64
  private superCompactTools;
65
+ private internalClipboardText;
65
66
  private voicePartialText;
66
67
  private resumeSessions;
67
68
  private resumeLoading;
@@ -86,6 +87,7 @@ export declare class PiUiExtendApp {
86
87
  private restoreTabInputState;
87
88
  private clearPersistedInputDraft;
88
89
  private insertVoiceTranscript;
90
+ private pasteInternalClipboard;
89
91
  private setVoicePartialTranscript;
90
92
  private addVoiceSystemMessage;
91
93
  private resetSessionView;
package/dist/app/app.js CHANGED
@@ -132,6 +132,7 @@ export class PiUiExtendApp {
132
132
  subagentsPanelExpanded = true;
133
133
  allThinkingExpanded = false;
134
134
  superCompactTools = false;
135
+ internalClipboardText;
135
136
  voicePartialText;
136
137
  resumeSessions = [];
137
138
  resumeLoading = false;
@@ -310,6 +311,7 @@ export class PiUiExtendApp {
310
311
  voiceStatusWidgetActive: () => this.voiceController.statusWidgetActive(),
311
312
  conversationQuickScrollDirections: () => this.conversationQuickScrollDirections(),
312
313
  queueableInputActive: () => this.inputEditor.promptText.trimEnd().length > 0 || this.inputEditor.images.length > 0,
314
+ internalClipboardActive: () => Boolean(this.internalClipboardText),
313
315
  userMessageJumpMenuActive: () => this.popupMenus.directMenu === "user-message-jump",
314
316
  allThinkingExpandedActive: () => this.allThinkingExpanded,
315
317
  superCompactToolsActive: () => this.superCompactTools,
@@ -613,6 +615,10 @@ export class PiUiExtendApp {
613
615
  this.render();
614
616
  });
615
617
  },
618
+ pasteInternalClipboard: () => this.pasteInternalClipboard(),
619
+ setInternalClipboardText: (text) => {
620
+ this.internalClipboardText = text;
621
+ },
616
622
  scrollConversationQuick: (direction) => this.scrollConversationQuick(direction),
617
623
  toggleAllThinkingExpanded: () => {
618
624
  this.allThinkingExpanded = !this.allThinkingExpanded;
@@ -792,6 +798,7 @@ export class PiUiExtendApp {
792
798
  this.mouseController.statusContextTarget = undefined;
793
799
  this.mouseController.statusModelUsageTarget = undefined;
794
800
  this.mouseController.statusDraftQueueTarget = undefined;
801
+ this.mouseController.statusInternalClipboardTarget = undefined;
795
802
  this.mouseController.statusUserJumpTarget = undefined;
796
803
  this.mouseController.statusThinkingExpandTarget = undefined;
797
804
  this.mouseController.statusCompactToolsTarget = undefined;
@@ -966,6 +973,16 @@ export class PiUiExtendApp {
966
973
  this.inputEditor.insert(`${prefix}${transcript}${suffix}`);
967
974
  this.render();
968
975
  }
976
+ pasteInternalClipboard() {
977
+ if (!this.internalClipboardText) {
978
+ this.showToast("Nothing has been copied inside Pix yet.", "info");
979
+ return;
980
+ }
981
+ this.requestHistory.resetNavigation();
982
+ this.popupMenus.resetInputMenuDismissals();
983
+ this.inputEditor.attachPastedText(this.internalClipboardText);
984
+ this.render();
985
+ }
969
986
  setVoicePartialTranscript(text) {
970
987
  if (this.voicePartialText === text)
971
988
  return;
@@ -23,6 +23,7 @@ declare const NERD_FONT_ICONS: {
23
23
  readonly volumeOff: "󰖁";
24
24
  readonly user: "󰀄";
25
25
  readonly compactTools: "󰍜";
26
+ readonly clipboardPaste: "󰆒";
26
27
  readonly thinkingExpanded: "󰌵";
27
28
  readonly stopCircle: "󰙥";
28
29
  readonly timerSand: "󰔟";
package/dist/app/icons.js CHANGED
@@ -34,6 +34,7 @@ const NERD_FONT_ICONS = {
34
34
  volumeOff: "\u{f0581}",
35
35
  user: "\u{f0004}",
36
36
  compactTools: "\u{f035c}",
37
+ clipboardPaste: "\u{f0192}",
37
38
  thinkingExpanded: "\u{f0335}",
38
39
  stopCircle: "\u{f0665}",
39
40
  timerSand: "\u{f051f}",
@@ -66,6 +67,7 @@ const FALLBACK_ICONS = {
66
67
  volumeOff: "ø",
67
68
  user: "@",
68
69
  compactTools: "≡",
70
+ clipboardPaste: "P",
69
71
  thinkingExpanded: ">",
70
72
  stopCircle: "■",
71
73
  timerSand: "⏳",
@@ -268,6 +268,7 @@ export class AppRenderController {
268
268
  this.deps.mouseController.statusContextTarget = this.deps.statusLineRenderer.contextTarget(statusLayout.text, statusRow, statusLayout);
269
269
  this.deps.mouseController.statusModelUsageTarget = this.deps.statusLineRenderer.modelUsageTarget(statusLayout.text, statusRow, statusLayout);
270
270
  this.deps.mouseController.statusDraftQueueTarget = this.deps.statusLineRenderer.draftQueueTarget?.(statusLayout, statusRow);
271
+ this.deps.mouseController.statusInternalClipboardTarget = this.deps.statusLineRenderer.internalClipboardTarget?.(statusLayout, statusRow);
271
272
  this.deps.mouseController.statusUserJumpTarget = this.deps.statusLineRenderer.userJumpTarget?.(statusLayout, statusRow);
272
273
  this.deps.mouseController.statusThinkingExpandTarget = this.deps.statusLineRenderer.thinkingExpandTarget?.(statusLayout, statusRow);
273
274
  this.deps.mouseController.statusCompactToolsTarget = this.deps.statusLineRenderer.compactToolsTarget?.(statusLayout, statusRow);
@@ -1,6 +1,6 @@
1
1
  import type { AgentSession } from "@earendil-works/pi-coding-agent";
2
2
  import type { Theme } from "../../theme.js";
3
- import type { SessionActivity, StatusCompactToolsTarget, StatusContextTarget, StatusDraftQueueTarget, StatusLineLayout, StatusModelTarget, StatusModelUsageTarget, StatusPromptEnhancerTarget, StatusQuickScrollTarget, StatusSessionTarget, StatusTerminalBellSoundTarget, StatusThinkingExpandTarget, StatusThinkingTarget, StatusUserJumpTarget, StatusVoiceLanguageTarget, StatusVoiceMicTarget } from "../types.js";
3
+ import type { SessionActivity, StatusCompactToolsTarget, StatusContextTarget, StatusDraftQueueTarget, StatusInternalClipboardTarget, StatusLineLayout, StatusModelTarget, StatusModelUsageTarget, StatusPromptEnhancerTarget, StatusQuickScrollTarget, StatusSessionTarget, StatusTerminalBellSoundTarget, StatusThinkingExpandTarget, StatusThinkingTarget, StatusUserJumpTarget, StatusVoiceLanguageTarget, StatusVoiceMicTarget } from "../types.js";
4
4
  import type { ScreenStyler } from "../screen/screen-styler.js";
5
5
  import { type ModelColorsConfig } from "../../config.js";
6
6
  export type StatusLineRendererHost = {
@@ -31,6 +31,7 @@ export type StatusLineRendererHost = {
31
31
  down: boolean;
32
32
  };
33
33
  queueableInputActive?(): boolean;
34
+ internalClipboardActive?(): boolean;
34
35
  userMessageJumpMenuActive?(): boolean;
35
36
  allThinkingExpandedActive?(): boolean;
36
37
  superCompactToolsActive?(): boolean;
@@ -52,6 +53,7 @@ export declare class StatusLineRenderer {
52
53
  voiceLanguageTarget(layout: StatusLineLayout, row: number): StatusVoiceLanguageTarget | undefined;
53
54
  userJumpTarget(layout: StatusLineLayout, row: number): StatusUserJumpTarget | undefined;
54
55
  draftQueueTarget(layout: StatusLineLayout, row: number): StatusDraftQueueTarget | undefined;
56
+ internalClipboardTarget(layout: StatusLineLayout, row: number): StatusInternalClipboardTarget | undefined;
55
57
  thinkingExpandTarget(layout: StatusLineLayout, row: number): StatusThinkingExpandTarget | undefined;
56
58
  compactToolsTarget(layout: StatusLineLayout, row: number): StatusCompactToolsTarget | undefined;
57
59
  quickScrollUpTarget(layout: StatusLineLayout, row: number): StatusQuickScrollTarget | undefined;
@@ -65,6 +65,9 @@ export class StatusLineRenderer {
65
65
  appendWidget(draftQueueButton ? this.iconButtonText(draftQueueButton) : "", (column, text) => {
66
66
  layout.draftQueueWidget = this.widgetLayout(column, text);
67
67
  });
68
+ appendWidget(this.iconButtonText(APP_ICONS.clipboardPaste), (column, text) => {
69
+ layout.internalClipboardWidget = this.widgetLayout(column, text);
70
+ });
68
71
  const promptEnhancerWidgetText = this.host.promptEnhancerStatusWidgetText();
69
72
  appendWidget(promptEnhancerWidgetText ? this.iconButtonText(promptEnhancerWidgetText) : "", (column, text) => {
70
73
  layout.promptEnhancerWidget = this.widgetLayout(column, text);
@@ -141,6 +144,7 @@ export class StatusLineRenderer {
141
144
  });
142
145
  };
143
146
  pushWidgetSegment(layout.draftQueueWidget, colors.info);
147
+ pushWidgetSegment(layout.internalClipboardWidget, this.host.internalClipboardActive?.() ? colors.info : colors.muted);
144
148
  pushWidgetSegment(layout.promptEnhancerWidget, this.host.promptEnhancerStatusWidgetActive()
145
149
  ? colors.warning
146
150
  : this.host.promptEnhancerStatusWidgetEnabled()
@@ -251,6 +255,12 @@ export class StatusLineRenderer {
251
255
  return undefined;
252
256
  return { row, startColumn: widget.startColumn, endColumn: widget.endColumn };
253
257
  }
258
+ internalClipboardTarget(layout, row) {
259
+ const widget = layout.internalClipboardWidget;
260
+ if (!widget)
261
+ return undefined;
262
+ return { row, startColumn: widget.startColumn, endColumn: widget.endColumn };
263
+ }
254
264
  thinkingExpandTarget(layout, row) {
255
265
  const widget = layout.thinkingExpandWidget;
256
266
  if (!widget)
@@ -339,6 +349,7 @@ export class StatusLineRenderer {
339
349
  const colors = this.host.theme.colors;
340
350
  const widgets = [
341
351
  { widget: layout.draftQueueWidget, foreground: colors.info },
352
+ { widget: layout.internalClipboardWidget, foreground: this.host.internalClipboardActive?.() ? colors.info : colors.muted },
342
353
  { widget: layout.promptEnhancerWidget, foreground: this.host.promptEnhancerStatusWidgetActive()
343
354
  ? colors.warning
344
355
  : this.host.promptEnhancerStatusWidgetEnabled()
@@ -6,7 +6,7 @@ import type { ToastEntry, ToastVariant } from "../../ui.js";
6
6
  import type { AppPopupActionController } from "../popup/popup-action-controller.js";
7
7
  import type { AppPopupMenuController } from "../popup/popup-menu-controller.js";
8
8
  import type { AppScrollController } from "./scroll-controller.js";
9
- import type { Entry, ImageClickTarget, MouseEvent, MouseSelection, StatusContextTarget, StatusCompactToolsTarget, StatusDraftQueueTarget, StatusModelTarget, StatusModelUsageTarget, StatusPromptEnhancerTarget, StatusQuickScrollTarget, StatusSessionTarget, StatusTerminalBellSoundTarget, TabLineMouseTarget, StatusThinkingExpandTarget, StatusThinkingTarget, StatusUserJumpTarget, StatusVoiceLanguageTarget, StatusVoiceMicTarget } from "../types.js";
9
+ import type { Entry, ImageClickTarget, MouseEvent, MouseSelection, StatusContextTarget, StatusCompactToolsTarget, StatusDraftQueueTarget, StatusInternalClipboardTarget, StatusModelTarget, StatusModelUsageTarget, StatusPromptEnhancerTarget, StatusQuickScrollTarget, StatusSessionTarget, StatusTerminalBellSoundTarget, TabLineMouseTarget, StatusThinkingExpandTarget, StatusThinkingTarget, StatusUserJumpTarget, StatusVoiceLanguageTarget, StatusVoiceMicTarget } from "../types.js";
10
10
  import { type RenderedLink } from "./file-links.js";
11
11
  import type { AgentSession } from "@earendil-works/pi-coding-agent";
12
12
  type ClickFlash = {
@@ -56,6 +56,8 @@ export type AppMouseControllerHost = {
56
56
  refreshModelUsageStatus(): void | Promise<void>;
57
57
  refreshUserMessageJumpMenuItems?(): Promise<void>;
58
58
  queueInputFromStatus?(): void | Promise<void>;
59
+ pasteInternalClipboard?(): void;
60
+ setInternalClipboardText?(text: string): void;
59
61
  scrollConversationQuick(direction: "up" | "down"): void | Promise<void>;
60
62
  toggleAllThinkingExpanded?(): void;
61
63
  toggleSuperCompactTools?(): void;
@@ -102,6 +104,7 @@ export declare class AppMouseController {
102
104
  statusModelUsageTarget: StatusModelUsageTarget | undefined;
103
105
  statusUserJumpTarget: StatusUserJumpTarget | undefined;
104
106
  statusDraftQueueTarget: StatusDraftQueueTarget | undefined;
107
+ statusInternalClipboardTarget: StatusInternalClipboardTarget | undefined;
105
108
  statusThinkingExpandTarget: StatusThinkingExpandTarget | undefined;
106
109
  statusCompactToolsTarget: StatusCompactToolsTarget | undefined;
107
110
  statusQuickScrollUpTarget: StatusQuickScrollTarget | undefined;
@@ -161,6 +164,7 @@ export declare class AppMouseController {
161
164
  private handleInputBorderStatusClick;
162
165
  private openStatusUserJumpMenu;
163
166
  private handleStatusDraftQueueClick;
167
+ private handleStatusInternalClipboardClick;
164
168
  private handleStatusThinkingExpandClick;
165
169
  private handleStatusCompactToolsClick;
166
170
  private handleStatusTerminalBellSoundClick;
@@ -26,6 +26,7 @@ export class AppMouseController {
26
26
  statusModelUsageTarget;
27
27
  statusUserJumpTarget;
28
28
  statusDraftQueueTarget;
29
+ statusInternalClipboardTarget;
29
30
  statusThinkingExpandTarget;
30
31
  statusCompactToolsTarget;
31
32
  statusQuickScrollUpTarget;
@@ -317,6 +318,7 @@ export class AppMouseController {
317
318
  this.statusContextTarget,
318
319
  this.statusModelUsageTarget,
319
320
  this.statusDraftQueueTarget,
321
+ this.statusInternalClipboardTarget,
320
322
  this.statusUserJumpTarget,
321
323
  this.statusThinkingExpandTarget,
322
324
  this.statusCompactToolsTarget,
@@ -496,6 +498,7 @@ export class AppMouseController {
496
498
  }
497
499
  handleInputBorderStatusClick(event) {
498
500
  return this.handleStatusDraftQueueClick(event)
501
+ || this.handleStatusInternalClipboardClick(event)
499
502
  || this.handleStatusUserJumpClick(event)
500
503
  || this.handleStatusThinkingExpandClick(event)
501
504
  || this.handleStatusCompactToolsClick(event)
@@ -525,6 +528,12 @@ export class AppMouseController {
525
528
  void this.host.queueInputFromStatus?.();
526
529
  return true;
527
530
  }
531
+ handleStatusInternalClipboardClick(event) {
532
+ if (!this.statusTargetContains(this.statusInternalClipboardTarget, event))
533
+ return false;
534
+ this.host.pasteInternalClipboard?.();
535
+ return true;
536
+ }
528
537
  handleStatusThinkingExpandClick(event) {
529
538
  if (!this.statusTargetContains(this.statusThinkingExpandTarget, event))
530
539
  return false;
@@ -682,9 +691,12 @@ export class AppMouseController {
682
691
  return false;
683
692
  }
684
693
  const selectedText = this.getSelectedText(selection);
685
- this.host.render();
686
- if (selectedText.trim().length === 0)
694
+ if (selectedText.trim().length === 0) {
695
+ this.host.render();
687
696
  return true;
697
+ }
698
+ this.host.setInternalClipboardText?.(selectedText);
699
+ this.host.render();
688
700
  try {
689
701
  this.copyTextToClipboard(selectedText);
690
702
  this.host.showToast("Copied to clipboard", "success");
@@ -279,6 +279,7 @@ export type StatusLineLayout = {
279
279
  quickScrollDownWidget?: StatusQuickScrollWidgetLayout;
280
280
  userJumpWidget?: StatusUserJumpWidgetLayout;
281
281
  draftQueueWidget?: StatusDraftQueueWidgetLayout;
282
+ internalClipboardWidget?: StatusInternalClipboardWidgetLayout;
282
283
  thinkingExpandWidget?: StatusThinkingExpandWidgetLayout;
283
284
  compactToolsWidget?: StatusCompactToolsWidgetLayout;
284
285
  terminalBellSoundWidget?: StatusTerminalBellSoundWidgetLayout;
@@ -297,6 +298,10 @@ export type StatusDraftQueueWidgetLayout = {
297
298
  startColumn: number;
298
299
  endColumn: number;
299
300
  };
301
+ export type StatusInternalClipboardWidgetLayout = {
302
+ startColumn: number;
303
+ endColumn: number;
304
+ };
300
305
  export type StatusThinkingExpandWidgetLayout = {
301
306
  startColumn: number;
302
307
  endColumn: number;
@@ -594,6 +599,11 @@ export type StatusDraftQueueTarget = {
594
599
  startColumn: number;
595
600
  endColumn: number;
596
601
  };
602
+ export type StatusInternalClipboardTarget = {
603
+ row: number;
604
+ startColumn: number;
605
+ endColumn: number;
606
+ };
597
607
  export type StatusThinkingExpandTarget = {
598
608
  row: number;
599
609
  startColumn: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-ui-extend",
3
- "version": "0.1.71",
3
+ "version": "0.1.72",
4
4
  "description": "Pix: a workspace-first terminal UI for Pi with tabs, readable tool activity, voice input, and bundled agent tools.",
5
5
  "private": false,
6
6
  "repository": {