@earendil-works/pi-coding-agent 0.84.0 → 0.84.1
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/CHANGELOG.md +31 -2
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +3 -3
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/auth-check.d.ts +19 -0
- package/dist/cli/auth-check.d.ts.map +1 -0
- package/dist/cli/auth-check.js +50 -0
- package/dist/cli/auth-check.js.map +1 -0
- package/dist/cli/auth-command.d.ts +24 -0
- package/dist/cli/auth-command.d.ts.map +1 -0
- package/dist/cli/auth-command.js +102 -0
- package/dist/cli/auth-command.js.map +1 -0
- package/dist/cli/credential-print.d.ts +4 -14
- package/dist/cli/credential-print.d.ts.map +1 -1
- package/dist/cli/credential-print.js +38 -79
- package/dist/cli/credential-print.js.map +1 -1
- package/dist/core/auth-storage.d.ts +10 -0
- package/dist/core/auth-storage.d.ts.map +1 -1
- package/dist/core/auth-storage.js +78 -1
- package/dist/core/auth-storage.js.map +1 -1
- package/dist/core/extensions/types.d.ts +5 -0
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/keybindings.d.ts +8 -0
- package/dist/core/keybindings.d.ts.map +1 -1
- package/dist/core/model-resolver.d.ts.map +1 -1
- package/dist/core/model-resolver.js +1 -0
- package/dist/core/model-resolver.js.map +1 -1
- package/dist/core/model-runtime.d.ts +2 -0
- package/dist/core/model-runtime.d.ts.map +1 -1
- package/dist/core/model-runtime.js +3 -1
- package/dist/core/model-runtime.js.map +1 -1
- package/dist/core/tools/bash.d.ts +4 -0
- package/dist/core/tools/bash.d.ts.map +1 -1
- package/dist/core/tools/bash.js +6 -4
- package/dist/core/tools/bash.js.map +1 -1
- package/dist/core/tools/edit.d.ts +4 -0
- package/dist/core/tools/edit.d.ts.map +1 -1
- package/dist/core/tools/edit.js +11 -7
- package/dist/core/tools/edit.js.map +1 -1
- package/dist/core/tools/find.d.ts +4 -0
- package/dist/core/tools/find.d.ts.map +1 -1
- package/dist/core/tools/find.js +5 -1
- package/dist/core/tools/find.js.map +1 -1
- package/dist/core/tools/grep.d.ts +4 -0
- package/dist/core/tools/grep.d.ts.map +1 -1
- package/dist/core/tools/grep.js +5 -1
- package/dist/core/tools/grep.js.map +1 -1
- package/dist/core/tools/ls.d.ts +4 -0
- package/dist/core/tools/ls.d.ts.map +1 -1
- package/dist/core/tools/ls.js +5 -1
- package/dist/core/tools/ls.js.map +1 -1
- package/dist/core/tools/read.d.ts +4 -0
- package/dist/core/tools/read.d.ts.map +1 -1
- package/dist/core/tools/read.js +6 -2
- package/dist/core/tools/read.js.map +1 -1
- package/dist/core/tools/write.d.ts +4 -0
- package/dist/core/tools/write.d.ts.map +1 -1
- package/dist/core/tools/write.js +6 -2
- package/dist/core/tools/write.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +57 -21
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +3 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +37 -6
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme.js +11 -3
- package/dist/modes/interactive/theme/theme.js.map +1 -1
- package/dist/server/create-harness.d.ts +26 -0
- package/dist/server/create-harness.d.ts.map +1 -0
- package/dist/server/create-harness.js +104 -0
- package/dist/server/create-harness.js.map +1 -0
- package/docs/extensions.md +3 -2
- package/docs/keybindings.md +9 -5
- package/docs/providers.md +8 -1
- package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
- package/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/gondolin/package-lock.json +2 -2
- package/examples/extensions/gondolin/package.json +1 -1
- package/examples/extensions/sandbox/package-lock.json +2 -2
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/npm-shrinkwrap.json +23 -23
- package/package.json +7 -7
|
@@ -169,7 +169,10 @@ function formatLoginProviderCompletionDescription(provider) {
|
|
|
169
169
|
export function createInteractiveTui(options) {
|
|
170
170
|
const terminal = options.terminal ?? new ProcessTerminal();
|
|
171
171
|
if (options.tuiMode === "fullscreen") {
|
|
172
|
-
return new TuiAltScreen(terminal, options.showHardwareCursor, options.logDirectory, {
|
|
172
|
+
return new TuiAltScreen(terminal, options.showHardwareCursor, options.logDirectory, {
|
|
173
|
+
openUrl: openBrowser,
|
|
174
|
+
onRightClickPaste: options.onRightClickPaste,
|
|
175
|
+
});
|
|
173
176
|
}
|
|
174
177
|
return new TuiMainScreen(terminal, options.showHardwareCursor, options.logDirectory);
|
|
175
178
|
}
|
|
@@ -181,12 +184,19 @@ export function createInteractiveTuiReference(getTui) {
|
|
|
181
184
|
const value = Reflect.get(tui, property, tui);
|
|
182
185
|
if (typeof value !== "function")
|
|
183
186
|
return value;
|
|
187
|
+
let methodTui = tui;
|
|
188
|
+
let method = value;
|
|
184
189
|
return (...args) => {
|
|
185
|
-
const
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
+
const currentTui = getTui();
|
|
191
|
+
if (currentTui !== methodTui) {
|
|
192
|
+
const currentMethod = Reflect.get(currentTui, property, currentTui);
|
|
193
|
+
if (typeof currentMethod !== "function") {
|
|
194
|
+
throw new TypeError(`TUI property ${String(property)} is not callable`);
|
|
195
|
+
}
|
|
196
|
+
methodTui = currentTui;
|
|
197
|
+
method = currentMethod;
|
|
198
|
+
}
|
|
199
|
+
return Reflect.apply(method, methodTui, args);
|
|
190
200
|
};
|
|
191
201
|
},
|
|
192
202
|
set: (_target, property, value) => {
|
|
@@ -295,6 +305,9 @@ export class InteractiveMode {
|
|
|
295
305
|
// Custom header from extension (undefined = use built-in header)
|
|
296
306
|
customHeader = undefined;
|
|
297
307
|
options;
|
|
308
|
+
onRightClickPaste = () => {
|
|
309
|
+
void this.handleRightClickPaste();
|
|
310
|
+
};
|
|
298
311
|
autoTrustOnReloadCwd;
|
|
299
312
|
themeController;
|
|
300
313
|
// Convenience accessors
|
|
@@ -326,6 +339,7 @@ export class InteractiveMode {
|
|
|
326
339
|
tuiMode,
|
|
327
340
|
showHardwareCursor: this.settingsManager.getShowHardwareCursor(),
|
|
328
341
|
logDirectory: getAgentDir(),
|
|
342
|
+
onRightClickPaste: this.onRightClickPaste,
|
|
329
343
|
});
|
|
330
344
|
this.ui = createInteractiveTuiReference(() => this.renderer);
|
|
331
345
|
this.ui.setClearOnShrink(this.settingsManager.getClearOnShrink());
|
|
@@ -558,6 +572,7 @@ export class InteractiveMode {
|
|
|
558
572
|
showHardwareCursor,
|
|
559
573
|
logDirectory: getAgentDir(),
|
|
560
574
|
terminal,
|
|
575
|
+
onRightClickPaste: this.onRightClickPaste,
|
|
561
576
|
});
|
|
562
577
|
nextUi.setClearOnShrink(clearOnShrink);
|
|
563
578
|
nextUi.onDebug = onDebug;
|
|
@@ -2237,6 +2252,22 @@ export class InteractiveMode {
|
|
|
2237
2252
|
void this.handleClipboardPaste();
|
|
2238
2253
|
};
|
|
2239
2254
|
}
|
|
2255
|
+
async handleRightClickPaste() {
|
|
2256
|
+
const target = this.renderer.getFocusedComponent();
|
|
2257
|
+
const handleInput = target?.handleInput;
|
|
2258
|
+
if (!target || !handleInput)
|
|
2259
|
+
return;
|
|
2260
|
+
try {
|
|
2261
|
+
const text = await readClipboardText();
|
|
2262
|
+
if (!text || this.renderer.getFocusedComponent() !== target)
|
|
2263
|
+
return;
|
|
2264
|
+
handleInput.call(target, `\x1b[200~${text}\x1b[201~`);
|
|
2265
|
+
this.ui.requestRender();
|
|
2266
|
+
}
|
|
2267
|
+
catch {
|
|
2268
|
+
// Silently ignore clipboard errors (may not have permission, etc.)
|
|
2269
|
+
}
|
|
2270
|
+
}
|
|
2240
2271
|
async handleClipboardPaste() {
|
|
2241
2272
|
try {
|
|
2242
2273
|
const image = await readClipboardImage();
|