@bastani/atomic 0.9.16-alpha.10 → 0.9.16-alpha.11
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 +17 -0
- package/README.md +4 -4
- package/dist/builtin/intercom/CHANGELOG.md +6 -0
- package/dist/builtin/intercom/README.md +2 -5
- package/dist/builtin/intercom/index.bundle.mjs +176 -132
- package/dist/builtin/intercom/package.json +2 -2
- package/dist/builtin/intercom/skills/intercom/SKILL.md +1 -1
- package/dist/builtin/mcp/index.bundle.mjs +176 -120
- package/dist/builtin/mcp/package.json +2 -2
- package/dist/builtin/subagents/CHANGELOG.md +11 -0
- package/dist/builtin/subagents/README.md +3 -3
- package/dist/builtin/subagents/package.json +3 -3
- package/dist/builtin/subagents/src/extension/index.bundle.mjs +396 -208
- package/dist/builtin/web-access/index.bundle.mjs +176 -120
- package/dist/builtin/web-access/package.json +2 -2
- package/dist/builtin/workflows/CHANGELOG.md +11 -0
- package/dist/builtin/workflows/README.md +1 -1
- package/dist/builtin/workflows/builtin/{chunk-tr5kqhba.js → chunk-3y1hmzw6.js} +1 -1
- package/dist/builtin/workflows/builtin/{chunk-xhrvz7wj.js → chunk-bz1c9732.js} +1 -1
- package/dist/builtin/workflows/builtin/{chunk-1ryp6jxq.js → chunk-dattsgxg.js} +1 -1
- package/dist/builtin/workflows/builtin/{chunk-peps7f1q.js → chunk-gdx0avpx.js} +329 -135
- package/dist/builtin/workflows/builtin/{chunk-5n8ras9g.js → chunk-w9c7rkrk.js} +1 -1
- package/dist/builtin/workflows/builtin/goal.js +3 -3
- package/dist/builtin/workflows/builtin/index.js +4 -4
- package/dist/builtin/workflows/builtin/open-claude-design.js +1 -1
- package/dist/builtin/workflows/builtin/ralph.js +3 -3
- package/dist/builtin/workflows/package.json +2 -2
- package/dist/builtin/workflows/src/extension/index.bundle.mjs +427 -196
- package/dist/builtin/workflows/src/index.js +186 -140
- package/dist/cli/args.js +6 -6
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/config-selector.d.ts.map +1 -1
- package/dist/cli/config-selector.js +2 -1
- package/dist/cli/config-selector.js.map +1 -1
- package/dist/cli/session-picker.d.ts +2 -1
- package/dist/cli/session-picker.d.ts.map +1 -1
- package/dist/cli/session-picker.js +3 -2
- package/dist/cli/session-picker.js.map +1 -1
- package/dist/cli/startup-ui.d.ts.map +1 -1
- package/dist/cli/startup-ui.js +2 -1
- package/dist/cli/startup-ui.js.map +1 -1
- package/dist/core/agent-session-services.d.ts.map +1 -1
- package/dist/core/agent-session-services.js +6 -3
- package/dist/core/agent-session-services.js.map +1 -1
- package/dist/core/agent-session-state.d.ts.map +1 -1
- package/dist/core/agent-session-state.js +7 -5
- package/dist/core/agent-session-state.js.map +1 -1
- package/dist/core/agent-session-tool-hooks.d.ts.map +1 -1
- package/dist/core/agent-session-tool-hooks.js +9 -109
- package/dist/core/agent-session-tool-hooks.js.map +1 -1
- package/dist/core/agent-session-tool-registry.d.ts.map +1 -1
- package/dist/core/agent-session-tool-registry.js +9 -2
- package/dist/core/agent-session-tool-registry.js.map +1 -1
- package/dist/core/builtin-packages.d.ts +4 -0
- package/dist/core/builtin-packages.d.ts.map +1 -1
- package/dist/core/builtin-packages.js +22 -1
- package/dist/core/builtin-packages.js.map +1 -1
- package/dist/core/callback-activity.d.ts.map +1 -1
- package/dist/core/callback-activity.js +6 -3
- package/dist/core/callback-activity.js.map +1 -1
- package/dist/core/extensions/loader-core.d.ts +1 -0
- package/dist/core/extensions/loader-core.d.ts.map +1 -1
- package/dist/core/extensions/loader-core.js +11 -1
- package/dist/core/extensions/loader-core.js.map +1 -1
- package/dist/core/extensions/loader.d.ts +1 -1
- package/dist/core/extensions/loader.d.ts.map +1 -1
- package/dist/core/extensions/loader.js +1 -1
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/extensions/runner-registries.d.ts.map +1 -1
- package/dist/core/extensions/runner-registries.js +9 -4
- package/dist/core/extensions/runner-registries.js.map +1 -1
- package/dist/core/extensions/runner-shortcuts.d.ts.map +1 -1
- package/dist/core/extensions/runner-shortcuts.js +1 -0
- package/dist/core/extensions/runner-shortcuts.js.map +1 -1
- package/dist/core/keybindings.d.ts +5 -0
- package/dist/core/keybindings.d.ts.map +1 -1
- package/dist/core/keybindings.js +4 -0
- package/dist/core/keybindings.js.map +1 -1
- package/dist/core/mandatory-resource-loader.d.ts +6 -0
- package/dist/core/mandatory-resource-loader.d.ts.map +1 -0
- package/dist/core/mandatory-resource-loader.js +94 -0
- package/dist/core/mandatory-resource-loader.js.map +1 -0
- package/dist/core/mandatory-runtime-tools.d.ts +10 -0
- package/dist/core/mandatory-runtime-tools.d.ts.map +1 -0
- package/dist/core/mandatory-runtime-tools.js +31 -0
- package/dist/core/mandatory-runtime-tools.js.map +1 -0
- package/dist/core/resource-loader-reload.d.ts.map +1 -1
- package/dist/core/resource-loader-reload.js +24 -13
- package/dist/core/resource-loader-reload.js.map +1 -1
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +2 -0
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/settings-manager-ui-accessors.d.ts +4 -1
- package/dist/core/settings-manager-ui-accessors.d.ts.map +1 -1
- package/dist/core/settings-manager-ui-accessors.js +22 -0
- package/dist/core/settings-manager-ui-accessors.js.map +1 -1
- package/dist/core/settings-types.d.ts +4 -0
- package/dist/core/settings-types.d.ts.map +1 -1
- package/dist/core/settings-types.js.map +1 -1
- package/dist/core/slash-commands.js +1 -1
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/main-session.d.ts.map +1 -1
- package/dist/main-session.js +3 -2
- package/dist/main-session.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +6 -0
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/components/fast-mode-selector.js +2 -2
- package/dist/modes/interactive/components/fast-mode-selector.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector-handlers.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector-handlers.js +3 -0
- package/dist/modes/interactive/components/settings-selector-handlers.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector-items.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector-items.js +7 -0
- package/dist/modes/interactive/components/settings-selector-items.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector-types.d.ts +2 -0
- package/dist/modes/interactive/components/settings-selector-types.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector-types.js.map +1 -1
- package/dist/modes/interactive/interactive-deferred-startup.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-deferred-startup.js +1 -0
- package/dist/modes/interactive/interactive-deferred-startup.js.map +1 -1
- package/dist/modes/interactive/interactive-input-handling.js +3 -0
- package/dist/modes/interactive/interactive-input-handling.js.map +1 -1
- package/dist/modes/interactive/interactive-mode-base.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode-base.js +15 -1
- package/dist/modes/interactive/interactive-mode-base.js.map +1 -1
- package/dist/modes/interactive/interactive-mode-surface.d.ts +6 -1
- package/dist/modes/interactive/interactive-mode-surface.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode-surface.js.map +1 -1
- package/dist/modes/interactive/interactive-selectors.js +6 -1
- package/dist/modes/interactive/interactive-selectors.js.map +1 -1
- package/dist/modes/interactive/interactive-session-runtime.js +3 -0
- package/dist/modes/interactive/interactive-session-runtime.js.map +1 -1
- package/dist/modes/interactive/interactive-slash-commands.js +7 -12
- package/dist/modes/interactive/interactive-slash-commands.js.map +1 -1
- package/dist/modes/interactive/interactive-tui.d.ts +1 -0
- package/dist/modes/interactive/interactive-tui.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-tui.js +16 -0
- package/dist/modes/interactive/interactive-tui.js.map +1 -1
- package/dist/modes/rpc/rpc-session-binding.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-session-binding.js +2 -0
- package/dist/modes/rpc/rpc-session-binding.js.map +1 -1
- package/docs/environment-variables.md +2 -0
- package/docs/extensions.md +1 -1
- package/docs/intercom.md +6 -7
- package/docs/keybindings.md +5 -2
- package/docs/packages.md +1 -1
- package/docs/providers.md +1 -1
- package/docs/sdk.md +9 -7
- package/docs/settings.md +9 -3
- package/docs/subagents.md +2 -2
- package/docs/usage.md +7 -6
- package/docs/workflows.md +9 -7
- package/npm-shrinkwrap.json +59 -77
- package/package.json +7 -7
|
@@ -9230,11 +9230,13 @@ function runSynchronousCallback(descriptor, callback) {
|
|
|
9230
9230
|
}
|
|
9231
9231
|
}
|
|
9232
9232
|
async function runCallback(descriptor, callback) {
|
|
9233
|
+
if (!reporter)
|
|
9234
|
+
return callback();
|
|
9235
|
+
await yieldToEventLoop();
|
|
9233
9236
|
const active = beginActivity(descriptor);
|
|
9234
9237
|
if (!active)
|
|
9235
9238
|
return callback();
|
|
9236
9239
|
try {
|
|
9237
|
-
await yieldToEventLoop();
|
|
9238
9240
|
return await callback();
|
|
9239
9241
|
} finally {
|
|
9240
9242
|
active.reporter.finished(active.activity.id);
|
|
@@ -11966,12 +11968,34 @@ var init_runner_events = __esm(() => {
|
|
|
11966
11968
|
init_callback_activity();
|
|
11967
11969
|
});
|
|
11968
11970
|
|
|
11971
|
+
// src/core/mandatory-runtime-tools.ts
|
|
11972
|
+
function isTrustedMandatoryRuntimeTool(registration) {
|
|
11973
|
+
return MANDATORY_TOOL_NAMES.has(registration.definition.name) && TRUSTED_MANDATORY_DEFINITIONS.has(registration.definition);
|
|
11974
|
+
}
|
|
11975
|
+
function isMandatoryRuntimeTool(name) {
|
|
11976
|
+
return MANDATORY_TOOL_NAMES.has(name);
|
|
11977
|
+
}
|
|
11978
|
+
function appendRegisteredMandatoryTools(tools, registry) {
|
|
11979
|
+
for (const name of MANDATORY_TOOL_NAMES) {
|
|
11980
|
+
const tool = registry.get(name);
|
|
11981
|
+
if (tool && !tools.some((candidate) => candidate.name === name))
|
|
11982
|
+
tools.push(tool);
|
|
11983
|
+
}
|
|
11984
|
+
return tools;
|
|
11985
|
+
}
|
|
11986
|
+
var MANDATORY_TOOL_NAMES, TRUSTED_MANDATORY_DEFINITIONS;
|
|
11987
|
+
var init_mandatory_runtime_tools = __esm(() => {
|
|
11988
|
+
MANDATORY_TOOL_NAMES = new Set(["intercom"]);
|
|
11989
|
+
TRUSTED_MANDATORY_DEFINITIONS = new WeakSet;
|
|
11990
|
+
});
|
|
11991
|
+
|
|
11969
11992
|
// src/core/extensions/runner-registries.ts
|
|
11970
11993
|
function collectRegisteredTools(extensions) {
|
|
11971
11994
|
const toolsByName = new Map;
|
|
11972
11995
|
for (const ext of extensions) {
|
|
11973
11996
|
for (const tool of ext.tools.values()) {
|
|
11974
|
-
|
|
11997
|
+
const existing = toolsByName.get(tool.definition.name);
|
|
11998
|
+
if (!existing || isMandatoryRuntimeTool(tool.definition.name) && isTrustedMandatoryRuntimeTool(tool)) {
|
|
11975
11999
|
toolsByName.set(tool.definition.name, tool);
|
|
11976
12000
|
}
|
|
11977
12001
|
}
|
|
@@ -11979,13 +12003,16 @@ function collectRegisteredTools(extensions) {
|
|
|
11979
12003
|
return Array.from(toolsByName.values());
|
|
11980
12004
|
}
|
|
11981
12005
|
function findToolDefinition(extensions, toolName) {
|
|
12006
|
+
let first;
|
|
11982
12007
|
for (const ext of extensions) {
|
|
11983
12008
|
const tool = ext.tools.get(toolName);
|
|
11984
|
-
if (tool)
|
|
12009
|
+
if (!tool)
|
|
12010
|
+
continue;
|
|
12011
|
+
first ??= tool;
|
|
12012
|
+
if (isMandatoryRuntimeTool(toolName) && isTrustedMandatoryRuntimeTool(tool))
|
|
11985
12013
|
return tool.definition;
|
|
11986
|
-
}
|
|
11987
12014
|
}
|
|
11988
|
-
return;
|
|
12015
|
+
return first?.definition;
|
|
11989
12016
|
}
|
|
11990
12017
|
function collectFlags(extensions) {
|
|
11991
12018
|
const allFlags = new Map;
|
|
@@ -12053,6 +12080,9 @@ function resolveRegisteredCommands(extensions) {
|
|
|
12053
12080
|
return { ...command, invocationName };
|
|
12054
12081
|
});
|
|
12055
12082
|
}
|
|
12083
|
+
var init_runner_registries = __esm(() => {
|
|
12084
|
+
init_mandatory_runtime_tools();
|
|
12085
|
+
});
|
|
12056
12086
|
|
|
12057
12087
|
// src/core/extensions/runner-shortcuts.ts
|
|
12058
12088
|
function resolveExtensionShortcuts(extensions, resolvedKeybindings, hasUI) {
|
|
@@ -12116,6 +12146,7 @@ var init_runner_shortcuts = __esm(() => {
|
|
|
12116
12146
|
"app.thinking.toggle",
|
|
12117
12147
|
"app.editor.external",
|
|
12118
12148
|
"app.message.followUp",
|
|
12149
|
+
"app.message.copy",
|
|
12119
12150
|
"tui.input.submit",
|
|
12120
12151
|
"tui.select.confirm",
|
|
12121
12152
|
"tui.select.cancel",
|
|
@@ -12579,6 +12610,7 @@ var init_runner = __esm(() => {
|
|
|
12579
12610
|
init_loader_runtime();
|
|
12580
12611
|
init_runner_context();
|
|
12581
12612
|
init_runner_events();
|
|
12613
|
+
init_runner_registries();
|
|
12582
12614
|
init_runner_shortcuts();
|
|
12583
12615
|
init_runner_ui();
|
|
12584
12616
|
init_stale_context();
|
|
@@ -16179,14 +16211,13 @@ function getToolDefinition(name) {
|
|
|
16179
16211
|
}
|
|
16180
16212
|
function setActiveToolsByName(toolNames) {
|
|
16181
16213
|
const tools = [];
|
|
16182
|
-
const validToolNames = [];
|
|
16183
16214
|
for (const name of toolNames) {
|
|
16184
16215
|
const tool = this._toolRegistry.get(name);
|
|
16185
|
-
if (tool)
|
|
16216
|
+
if (tool)
|
|
16186
16217
|
tools.push(tool);
|
|
16187
|
-
validToolNames.push(name);
|
|
16188
|
-
}
|
|
16189
16218
|
}
|
|
16219
|
+
appendRegisteredMandatoryTools(tools, this._toolRegistry);
|
|
16220
|
+
const validToolNames = tools.map((tool) => tool.name);
|
|
16190
16221
|
this.agent.state.tools = tools;
|
|
16191
16222
|
this._baseSystemPrompt = this._rebuildSystemPrompt(validToolNames);
|
|
16192
16223
|
this.agent.state.systemPrompt = this._systemPromptOverride ?? this._baseSystemPrompt;
|
|
@@ -16243,7 +16274,7 @@ function _rebuildSystemPrompt(toolNames) {
|
|
|
16243
16274
|
customPrompt: loaderSystemPrompt,
|
|
16244
16275
|
appendSystemPrompt,
|
|
16245
16276
|
selectedTools: validToolNames,
|
|
16246
|
-
excludedTools: this._excludedToolNames ? Array.from(this._excludedToolNames) : undefined,
|
|
16277
|
+
excludedTools: this._excludedToolNames ? Array.from(this._excludedToolNames).filter((name) => !isMandatoryRuntimeTool(name)) : undefined,
|
|
16247
16278
|
toolSnippets,
|
|
16248
16279
|
promptGuidelines
|
|
16249
16280
|
};
|
|
@@ -16256,6 +16287,7 @@ function _refreshBaseSystemPromptFromActiveTools() {
|
|
|
16256
16287
|
}
|
|
16257
16288
|
var agentSessionStateMethods;
|
|
16258
16289
|
var init_agent_session_state = __esm(() => {
|
|
16290
|
+
init_mandatory_runtime_tools();
|
|
16259
16291
|
init_skill_catalog();
|
|
16260
16292
|
init_system_prompt();
|
|
16261
16293
|
agentSessionStateMethods = {
|
|
@@ -17284,31 +17316,14 @@ function _installAgentToolHooks() {
|
|
|
17284
17316
|
function _installAgentNextTurnRefresh() {
|
|
17285
17317
|
const previousPrepareNextTurnWithContext = this.agent.prepareNextTurnWithContext ?? (this.agent.prepareNextTurn ? async (_turn, signal) => await this.agent.prepareNextTurn?.(signal) : undefined);
|
|
17286
17318
|
const previousShouldStopAfterTurn = this.agent.shouldStopAfterTurn;
|
|
17287
|
-
let pendingStopResult;
|
|
17288
|
-
const pendingStopMatches = (turn) => {
|
|
17289
|
-
const pending = pendingStopResult;
|
|
17290
|
-
return pending?.message === turn.message && pending.toolResults === turn.toolResults && pending.newMessages === turn.newMessages;
|
|
17291
|
-
};
|
|
17292
|
-
const clearPendingStopResult = (turn) => {
|
|
17293
|
-
if (pendingStopMatches(turn))
|
|
17294
|
-
pendingStopResult = undefined;
|
|
17295
|
-
};
|
|
17296
17319
|
this.agent.shouldStopAfterTurn = async (turn, signal) => {
|
|
17297
|
-
const
|
|
17298
|
-
|
|
17299
|
-
|
|
17300
|
-
|
|
17301
|
-
}
|
|
17302
|
-
return await previousShouldStopAfterTurn?.(turn, signal) ?? false;
|
|
17303
|
-
};
|
|
17304
|
-
const cacheStopResult = async (turn, signal) => {
|
|
17320
|
+
const toolCallIds = turn.message.content.filter((part) => part.type === "toolCall").map((part) => part.id);
|
|
17321
|
+
const terminatingBatch = toolCallIds.length > 0 && toolCallIds.every((id) => this._terminatingToolCallIds.has(id));
|
|
17322
|
+
for (const id of toolCallIds)
|
|
17323
|
+
this._terminatingToolCallIds.delete(id);
|
|
17305
17324
|
const shouldStop = await previousShouldStopAfterTurn?.(turn, signal) ?? false;
|
|
17306
|
-
|
|
17307
|
-
|
|
17308
|
-
toolResults: turn.toolResults,
|
|
17309
|
-
newMessages: turn.newMessages,
|
|
17310
|
-
shouldStop
|
|
17311
|
-
};
|
|
17325
|
+
this._stopAfterTurnBlockedContinuation = shouldStop;
|
|
17326
|
+
await settleFallbackAfterTurn(this, turn, terminatingBatch);
|
|
17312
17327
|
return shouldStop;
|
|
17313
17328
|
};
|
|
17314
17329
|
const previousTransformContext = this.agent.transformContext;
|
|
@@ -17336,68 +17351,7 @@ function _installAgentNextTurnRefresh() {
|
|
|
17336
17351
|
thinkingLevel: this.agent.state.thinkingLevel
|
|
17337
17352
|
};
|
|
17338
17353
|
};
|
|
17339
|
-
|
|
17340
|
-
const prepareDeferredTurn = async (loopConfig) => {
|
|
17341
|
-
const deferred = deferredPreparation;
|
|
17342
|
-
if (!deferred)
|
|
17343
|
-
return;
|
|
17344
|
-
deferredPreparation = undefined;
|
|
17345
|
-
const snapshot = await prepareTurn(deferred.turn, deferred.signal);
|
|
17346
|
-
const nextContext = snapshot.context ?? deferred.turn.context;
|
|
17347
|
-
deferred.loopContext.systemPrompt = nextContext.systemPrompt;
|
|
17348
|
-
deferred.loopContext.messages = nextContext.messages;
|
|
17349
|
-
deferred.loopContext.tools = nextContext.tools;
|
|
17350
|
-
loopConfig.model = snapshot.model ?? loopConfig.model;
|
|
17351
|
-
loopConfig.reasoning = snapshot.thinkingLevel === undefined ? loopConfig.reasoning : snapshot.thinkingLevel === "off" ? undefined : snapshot.thinkingLevel;
|
|
17352
|
-
};
|
|
17353
|
-
const agentLoopDoor = this.agent;
|
|
17354
|
-
const previousCreateLoopConfig = agentLoopDoor.createLoopConfig.bind(this.agent);
|
|
17355
|
-
agentLoopDoor.createLoopConfig = (options) => {
|
|
17356
|
-
deferredPreparation = undefined;
|
|
17357
|
-
this._stopAfterTurnBlockedContinuation = false;
|
|
17358
|
-
const loopConfig = previousCreateLoopConfig(options);
|
|
17359
|
-
const wrapQueuePoll = (poll) => async function() {
|
|
17360
|
-
const messages = await poll?.() ?? [];
|
|
17361
|
-
if (messages.length > 0)
|
|
17362
|
-
await prepareDeferredTurn(this);
|
|
17363
|
-
return messages;
|
|
17364
|
-
};
|
|
17365
|
-
loopConfig.getSteeringMessages = wrapQueuePoll(loopConfig.getSteeringMessages);
|
|
17366
|
-
loopConfig.getFollowUpMessages = wrapQueuePoll(loopConfig.getFollowUpMessages);
|
|
17367
|
-
return loopConfig;
|
|
17368
|
-
};
|
|
17369
|
-
this.agent.prepareNextTurnWithContext = async (turn, signal) => {
|
|
17370
|
-
const toolCallIds = turn.message.content.filter((part) => part.type === "toolCall").map((part) => part.id);
|
|
17371
|
-
const terminatingBatch = toolCallIds.length > 0 && toolCallIds.every((id) => this._terminatingToolCallIds.has(id));
|
|
17372
|
-
for (const id of toolCallIds)
|
|
17373
|
-
this._terminatingToolCallIds.delete(id);
|
|
17374
|
-
const shouldStop = await cacheStopResult(turn, signal);
|
|
17375
|
-
try {
|
|
17376
|
-
if (shouldStop) {
|
|
17377
|
-
deferredPreparation = undefined;
|
|
17378
|
-
this._stopAfterTurnBlockedContinuation = true;
|
|
17379
|
-
await settleFallbackAfterTurn(this, turn, terminatingBatch);
|
|
17380
|
-
return;
|
|
17381
|
-
}
|
|
17382
|
-
if (turn.toolResults.length > 0 && !terminatingBatch) {
|
|
17383
|
-
deferredPreparation = undefined;
|
|
17384
|
-
const snapshot = await prepareTurn(turn, signal);
|
|
17385
|
-
await settleFallbackAfterTurn(this, turn, terminatingBatch);
|
|
17386
|
-
return snapshot;
|
|
17387
|
-
}
|
|
17388
|
-
await settleFallbackAfterTurn(this, turn, terminatingBatch);
|
|
17389
|
-
const loopContext = {
|
|
17390
|
-
...turn.context,
|
|
17391
|
-
messages: turn.context.messages.slice(),
|
|
17392
|
-
tools: turn.context.tools?.slice()
|
|
17393
|
-
};
|
|
17394
|
-
deferredPreparation = { turn, signal, loopContext };
|
|
17395
|
-
return { context: loopContext };
|
|
17396
|
-
} catch (error) {
|
|
17397
|
-
clearPendingStopResult(turn);
|
|
17398
|
-
throw error;
|
|
17399
|
-
}
|
|
17400
|
-
};
|
|
17354
|
+
this.agent.prepareNextTurnWithContext = prepareTurn;
|
|
17401
17355
|
}
|
|
17402
17356
|
async function settleFallbackAfterTurn(session, turn, terminatingBatch) {
|
|
17403
17357
|
const preserveFallbackForFailure = turn.message.role === "assistant" && !session.agent.hasQueuedMessages() && (turn.message.stopReason === "length" || session._isEmptyCompletion?.(turn.message) === true || session._isSafetyRefusal?.(turn.message) === true);
|
|
@@ -17487,6 +17441,7 @@ var init_loader_virtual_modules = __esm(() => {
|
|
|
17487
17441
|
});
|
|
17488
17442
|
|
|
17489
17443
|
// src/core/extensions/loader-core.ts
|
|
17444
|
+
var runtimeEventBuses;
|
|
17490
17445
|
var init_loader_core = __esm(() => {
|
|
17491
17446
|
init_event_loop();
|
|
17492
17447
|
init_paths();
|
|
@@ -17496,6 +17451,7 @@ var init_loader_core = __esm(() => {
|
|
|
17496
17451
|
init_loader_resources();
|
|
17497
17452
|
init_loader_runtime();
|
|
17498
17453
|
init_loader_virtual_modules();
|
|
17454
|
+
runtimeEventBuses = new WeakMap;
|
|
17499
17455
|
});
|
|
17500
17456
|
|
|
17501
17457
|
// src/core/package-manager-manifest.ts
|
|
@@ -22589,7 +22545,7 @@ class FastModeSelectorComponent {
|
|
|
22589
22545
|
}
|
|
22590
22546
|
invalidate() {}
|
|
22591
22547
|
render(width) {
|
|
22592
|
-
const lines = [truncateToWidth10(theme.bold(theme.fg("accent", "
|
|
22548
|
+
const lines = [truncateToWidth10(theme.bold(theme.fg("accent", "Fast mode")), width)];
|
|
22593
22549
|
for (const line of wrapTextWithAnsi3(DESCRIPTION, Math.max(20, width))) {
|
|
22594
22550
|
lines.push(theme.fg("muted", line));
|
|
22595
22551
|
}
|
|
@@ -22672,7 +22628,7 @@ class FastModeSelectorComponent {
|
|
|
22672
22628
|
return this.getFocusedRow() === row ? theme.fg("muted", text) : theme.fg("dim", text);
|
|
22673
22629
|
}
|
|
22674
22630
|
}
|
|
22675
|
-
var ROWS, LABEL_WIDTH = 16, DESCRIPTION = "
|
|
22631
|
+
var ROWS, LABEL_WIDTH = 16, DESCRIPTION = "Use faster routing for the selected model when supported by its provider.", ROW_DETAILS;
|
|
22676
22632
|
var init_fast_mode_selector = __esm(() => {
|
|
22677
22633
|
init_theme();
|
|
22678
22634
|
ROWS = ["chat", "workflow"];
|
|
@@ -23899,6 +23855,10 @@ var init_keybindings = __esm(() => {
|
|
|
23899
23855
|
defaultKeys: windowsKeybindings ? "alt+q" : "alt+up",
|
|
23900
23856
|
description: "Restore queued messages"
|
|
23901
23857
|
},
|
|
23858
|
+
"app.message.copy": {
|
|
23859
|
+
defaultKeys: "ctrl+x",
|
|
23860
|
+
description: "Copy fullscreen selection or last agent message"
|
|
23861
|
+
},
|
|
23902
23862
|
"app.clipboard.pasteImage": {
|
|
23903
23863
|
defaultKeys: windowsKeybindings ? "alt+v" : "ctrl+v",
|
|
23904
23864
|
description: "Paste image from clipboard (text fallback)"
|
|
@@ -25284,6 +25244,9 @@ function createSettingsChangeHandler(callbacks) {
|
|
|
25284
25244
|
case "fullscreen-exit-output":
|
|
25285
25245
|
callbacks.onFullscreenExitOutputChange(newValue);
|
|
25286
25246
|
break;
|
|
25247
|
+
case "fullscreen-copy-on-select":
|
|
25248
|
+
callbacks.onFullscreenCopyOnSelectChange(newValue === "true");
|
|
25249
|
+
break;
|
|
25287
25250
|
case "editor-padding":
|
|
25288
25251
|
callbacks.onEditorPaddingXChange(parseInt(newValue, 10));
|
|
25289
25252
|
break;
|
|
@@ -25671,6 +25634,13 @@ function insertUiToggles(items, config) {
|
|
|
25671
25634
|
values: ["transcript", "resume-hint"]
|
|
25672
25635
|
});
|
|
25673
25636
|
insertAfter(items, "fullscreen-exit-output", {
|
|
25637
|
+
id: "fullscreen-copy-on-select",
|
|
25638
|
+
label: "Fullscreen copy on select",
|
|
25639
|
+
description: "Copy selected transcript text automatically on mouse release",
|
|
25640
|
+
currentValue: config.fullscreenCopyOnSelect ? "true" : "false",
|
|
25641
|
+
values: ["true", "false"]
|
|
25642
|
+
});
|
|
25643
|
+
insertAfter(items, "fullscreen-copy-on-select", {
|
|
25674
25644
|
id: "editor-padding",
|
|
25675
25645
|
label: "Editor padding",
|
|
25676
25646
|
description: "Horizontal padding for input editor (0-3)",
|
|
@@ -38745,6 +38715,8 @@ function _refreshToolRegistry(options) {
|
|
|
38745
38715
|
const allowedToolNames = this._allowedToolNames;
|
|
38746
38716
|
const excludedToolNames = this._excludedToolNames;
|
|
38747
38717
|
const isExposedTool = (name) => {
|
|
38718
|
+
if (isMandatoryRuntimeTool(name))
|
|
38719
|
+
return true;
|
|
38748
38720
|
if (allowedToolNames && !allowedToolNames.has(name)) {
|
|
38749
38721
|
return false;
|
|
38750
38722
|
}
|
|
@@ -38753,10 +38725,10 @@ function _refreshToolRegistry(options) {
|
|
|
38753
38725
|
}
|
|
38754
38726
|
return true;
|
|
38755
38727
|
};
|
|
38756
|
-
const registeredTools = this._extensionRunner.getAllRegisteredTools();
|
|
38728
|
+
const registeredTools = this._extensionRunner.getAllRegisteredTools().filter((tool) => !isMandatoryRuntimeTool(tool.definition.name) || isTrustedMandatoryRuntimeTool(tool));
|
|
38757
38729
|
const allCustomTools = [
|
|
38758
38730
|
...registeredTools,
|
|
38759
|
-
...this._customTools.map((definition) => ({
|
|
38731
|
+
...this._customTools.filter((definition) => !isMandatoryRuntimeTool(definition.name)).map((definition) => ({
|
|
38760
38732
|
definition,
|
|
38761
38733
|
sourceInfo: createSyntheticSourceInfo(`<sdk:${definition.name}>`, { source: "sdk" })
|
|
38762
38734
|
}))
|
|
@@ -38877,6 +38849,7 @@ function _buildRuntime(options) {
|
|
|
38877
38849
|
var agentSessionToolRegistryMethods;
|
|
38878
38850
|
var init_agent_session_tool_registry = __esm(() => {
|
|
38879
38851
|
init_extensions();
|
|
38852
|
+
init_mandatory_runtime_tools();
|
|
38880
38853
|
init_model_registry();
|
|
38881
38854
|
init_tools();
|
|
38882
38855
|
init_session_temp_dir();
|
|
@@ -39868,11 +39841,12 @@ var init_builtin_packages = __esm(() => {
|
|
|
39868
39841
|
{ packageName: "@bastani/subagents", workspaceDirName: "subagents", distDirName: "subagents" },
|
|
39869
39842
|
{ packageName: "@bastani/mcp", workspaceDirName: "mcp", distDirName: "mcp" },
|
|
39870
39843
|
{ packageName: "@bastani/web-access", workspaceDirName: "web-access", distDirName: "web-access" },
|
|
39871
|
-
{ packageName: "@bastani/intercom", workspaceDirName: "intercom", distDirName: "intercom" }
|
|
39844
|
+
{ packageName: "@bastani/intercom", workspaceDirName: "intercom", distDirName: "intercom", mandatory: true }
|
|
39872
39845
|
];
|
|
39873
39846
|
BUILTIN_PACKAGES = WORKSPACE_BUILTINS.map((spec) => ({
|
|
39874
39847
|
packageName: spec.packageName,
|
|
39875
39848
|
distDirName: spec.distDirName,
|
|
39849
|
+
mandatory: spec.mandatory === true,
|
|
39876
39850
|
requiredEntries: requiredEntriesForBuiltin(spec.distDirName),
|
|
39877
39851
|
sourceCandidates: ({ here, packageDir, isSourceCheckout }) => isSourceCheckout ? [join37(packageDir, "..", spec.workspaceDirName), join37(here, "..", "..", "..", spec.workspaceDirName)] : []
|
|
39878
39852
|
}));
|
|
@@ -43191,7 +43165,9 @@ var init_resource_loader_extensions = __esm(() => {
|
|
|
43191
43165
|
var init_resource_loader_reload = __esm(() => {
|
|
43192
43166
|
init_event_loop();
|
|
43193
43167
|
init_paths();
|
|
43168
|
+
init_builtin_packages();
|
|
43194
43169
|
init_loader();
|
|
43170
|
+
init_mandatory_runtime_tools();
|
|
43195
43171
|
init_resource_loader_assets();
|
|
43196
43172
|
init_resource_loader_context_files();
|
|
43197
43173
|
init_resource_loader_discovery();
|
|
@@ -44348,6 +44324,28 @@ var init_settings_manager_ui_accessors = __esm(() => {
|
|
|
44348
44324
|
state.markModified("fullscreenExitOutput");
|
|
44349
44325
|
state.save();
|
|
44350
44326
|
},
|
|
44327
|
+
getFullscreenCopyOnSelect() {
|
|
44328
|
+
return settingsInternals(this).settings.fullscreenCopyOnSelect !== false;
|
|
44329
|
+
},
|
|
44330
|
+
setFullscreenCopyOnSelect(enabled) {
|
|
44331
|
+
const state = settingsInternals(this);
|
|
44332
|
+
state.globalSettings.fullscreenCopyOnSelect = enabled;
|
|
44333
|
+
state.markModified("fullscreenCopyOnSelect");
|
|
44334
|
+
state.save();
|
|
44335
|
+
},
|
|
44336
|
+
getTerminalCapabilityOverrides() {
|
|
44337
|
+
const terminal = settingsInternals(this).settings.terminal;
|
|
44338
|
+
const overrides = {};
|
|
44339
|
+
if (typeof terminal?.hyperlinks === "boolean")
|
|
44340
|
+
overrides.hyperlinks = terminal.hyperlinks;
|
|
44341
|
+
if (terminal?.images === "kitty" || terminal?.images === "iterm2")
|
|
44342
|
+
overrides.images = terminal.images;
|
|
44343
|
+
else if (terminal?.images === false)
|
|
44344
|
+
overrides.images = null;
|
|
44345
|
+
if (typeof terminal?.trueColor === "boolean")
|
|
44346
|
+
overrides.trueColor = terminal.trueColor;
|
|
44347
|
+
return overrides;
|
|
44348
|
+
},
|
|
44351
44349
|
getEditorPaddingX() {
|
|
44352
44350
|
return settingsInternals(this).settings.editorPaddingX ?? 0;
|
|
44353
44351
|
},
|
|
@@ -44493,6 +44491,14 @@ var init_resource_loader = __esm(() => {
|
|
|
44493
44491
|
init_resource_loader_core();
|
|
44494
44492
|
init_skill_catalog();
|
|
44495
44493
|
});
|
|
44494
|
+
// src/core/mandatory-resource-loader.ts
|
|
44495
|
+
var init_mandatory_resource_loader = __esm(() => {
|
|
44496
|
+
init_builtin_packages();
|
|
44497
|
+
init_loader();
|
|
44498
|
+
init_mandatory_runtime_tools();
|
|
44499
|
+
init_skill_catalog();
|
|
44500
|
+
});
|
|
44501
|
+
|
|
44496
44502
|
// src/core/model-resolver-defaults.ts
|
|
44497
44503
|
function findPreferredAvailableModel(availableModels) {
|
|
44498
44504
|
for (const [provider, defaultId] of Object.entries(defaultModelPerProvider)) {
|
|
@@ -45191,6 +45197,7 @@ var init_session_cwd = __esm(() => {
|
|
|
45191
45197
|
var init_agent_session_services = __esm(() => {
|
|
45192
45198
|
init_config();
|
|
45193
45199
|
init_paths();
|
|
45200
|
+
init_mandatory_resource_loader();
|
|
45194
45201
|
init_model_runtime();
|
|
45195
45202
|
init_resource_loader();
|
|
45196
45203
|
init_sdk();
|
|
@@ -45527,6 +45534,7 @@ var init_sdk = __esm(() => {
|
|
|
45527
45534
|
init_agent_session();
|
|
45528
45535
|
init_auth_guidance();
|
|
45529
45536
|
init_codex_fast_mode();
|
|
45537
|
+
init_mandatory_resource_loader();
|
|
45530
45538
|
init_messages();
|
|
45531
45539
|
init_model_resolver();
|
|
45532
45540
|
init_model_runtime();
|
|
@@ -45630,7 +45638,12 @@ var init_list_models = __esm(() => {
|
|
|
45630
45638
|
});
|
|
45631
45639
|
|
|
45632
45640
|
// src/cli/startup-ui.ts
|
|
45633
|
-
import {
|
|
45641
|
+
import {
|
|
45642
|
+
ProcessTerminal,
|
|
45643
|
+
setCapabilityOverrides,
|
|
45644
|
+
setKeybindings,
|
|
45645
|
+
TuiMainScreen
|
|
45646
|
+
} from "@earendil-works/pi-tui";
|
|
45634
45647
|
var init_startup_ui = __esm(() => {
|
|
45635
45648
|
init_config();
|
|
45636
45649
|
init_keybindings();
|
|
@@ -45718,7 +45731,7 @@ var init_main_first_time_setup = __esm(() => {
|
|
|
45718
45731
|
init_startup_ui();
|
|
45719
45732
|
});
|
|
45720
45733
|
// src/cli/session-picker.ts
|
|
45721
|
-
import { ProcessTerminal as ProcessTerminal2, setKeybindings as setKeybindings2, TuiMainScreen as TuiMainScreen2 } from "@earendil-works/pi-tui";
|
|
45734
|
+
import { ProcessTerminal as ProcessTerminal2, setCapabilityOverrides as setCapabilityOverrides2, setKeybindings as setKeybindings2, TuiMainScreen as TuiMainScreen2 } from "@earendil-works/pi-tui";
|
|
45722
45735
|
var init_session_picker = __esm(() => {
|
|
45723
45736
|
init_config();
|
|
45724
45737
|
init_keybindings();
|
|
@@ -45726,7 +45739,7 @@ var init_session_picker = __esm(() => {
|
|
|
45726
45739
|
});
|
|
45727
45740
|
|
|
45728
45741
|
// src/main-session.ts
|
|
45729
|
-
import { ProcessTerminal as ProcessTerminal3, setKeybindings as setKeybindings3, TuiMainScreen as TuiMainScreen3 } from "@earendil-works/pi-tui";
|
|
45742
|
+
import { ProcessTerminal as ProcessTerminal3, setCapabilityOverrides as setCapabilityOverrides3, setKeybindings as setKeybindings3, TuiMainScreen as TuiMainScreen3 } from "@earendil-works/pi-tui";
|
|
45730
45743
|
import chalk10 from "chalk";
|
|
45731
45744
|
var init_main_session = __esm(() => {
|
|
45732
45745
|
init_session_picker();
|
|
@@ -48544,7 +48557,7 @@ var init_slash_commands = __esm(() => {
|
|
|
48544
48557
|
{ name: "tree", description: "Navigate session tree (switch branches)" },
|
|
48545
48558
|
{ name: "thinking", description: "Set thinking level", argumentHint: "<level>" },
|
|
48546
48559
|
{ name: "scoped-models", description: "Enable/disable models for ctrl+p cycling" },
|
|
48547
|
-
{ name: "fast", description: "Configure
|
|
48560
|
+
{ name: "fast", description: "Configure fast mode for chat and workflows on supported models" },
|
|
48548
48561
|
{ name: "export", description: "Export session (HTML default, or specify path: .html/.jsonl)" },
|
|
48549
48562
|
{ name: "import", description: "Import and resume a session from a JSONL file" },
|
|
48550
48563
|
{ name: "share", description: "Share session as a secret GitHub gist" },
|
|
@@ -49170,6 +49183,7 @@ function createFullscreenTui(options) {
|
|
|
49170
49183
|
openUrl: openBrowser
|
|
49171
49184
|
}),
|
|
49172
49185
|
onRightClickPaste: options.onRightClickPaste,
|
|
49186
|
+
copyOnSelect: options.copyOnSelect,
|
|
49173
49187
|
copySelection: options.copySelection ?? copySelectionToHostClipboard
|
|
49174
49188
|
}, options.shouldHandleViewportInput, options.onOverlayUnhandledInput);
|
|
49175
49189
|
}
|
|
@@ -49211,7 +49225,7 @@ function createInteractiveTuiReference(getTui) {
|
|
|
49211
49225
|
getPrototypeOf: () => Reflect.getPrototypeOf(getTui())
|
|
49212
49226
|
});
|
|
49213
49227
|
}
|
|
49214
|
-
var viewportInputListeners, viewportInputGates, overlayUnhandledInputHandlers, viewportInputReplays, viewportInputSubscriptions, SGR_MOUSE_SEQUENCE, LEFT_MOUSE_MODIFIER_MASK, AtomicTuiAltScreen, AtomicTuiMainScreen;
|
|
49228
|
+
var viewportInputListeners, viewportInputGates, overlayUnhandledInputHandlers, viewportInputReplays, overlayOwnedSelections, viewportInputSubscriptions, SGR_MOUSE_SEQUENCE, LEFT_MOUSE_MODIFIER_MASK, AtomicTuiAltScreen, AtomicTuiMainScreen;
|
|
49215
49229
|
var init_interactive_tui = __esm(() => {
|
|
49216
49230
|
init_clipboard();
|
|
49217
49231
|
init_open_browser();
|
|
@@ -49220,6 +49234,7 @@ var init_interactive_tui = __esm(() => {
|
|
|
49220
49234
|
viewportInputGates = new WeakMap;
|
|
49221
49235
|
overlayUnhandledInputHandlers = new WeakMap;
|
|
49222
49236
|
viewportInputReplays = new WeakSet;
|
|
49237
|
+
overlayOwnedSelections = new WeakSet;
|
|
49223
49238
|
viewportInputSubscriptions = new WeakMap;
|
|
49224
49239
|
SGR_MOUSE_SEQUENCE = /^\x1b\[<(\d+);\d+;\d+([Mm])/;
|
|
49225
49240
|
LEFT_MOUSE_MODIFIER_MASK = 4 | 8 | 16;
|
|
@@ -49235,8 +49250,20 @@ var init_interactive_tui = __esm(() => {
|
|
|
49235
49250
|
deferral.shouldDeferViewportInputToOverlay = () => !viewportInputReplays.has(this) && deferToOverlay?.() === true;
|
|
49236
49251
|
}
|
|
49237
49252
|
applyLineResets(lines) {
|
|
49253
|
+
if (overlayOwnedSelections.has(this) && !this.isFocusedOverlay())
|
|
49254
|
+
this.clearOverlayOwnedSelection();
|
|
49238
49255
|
return stripOverlayActiveRowMarker(super.applyLineResets(lines));
|
|
49239
49256
|
}
|
|
49257
|
+
clearOverlayOwnedSelection() {
|
|
49258
|
+
const selection = this;
|
|
49259
|
+
selection.selectionAnchor = undefined;
|
|
49260
|
+
selection.selectionFocus = undefined;
|
|
49261
|
+
selection.selectionInitialRange = undefined;
|
|
49262
|
+
selection.selectionPressActive = false;
|
|
49263
|
+
selection.selectionDragged = false;
|
|
49264
|
+
selection.lastClick = undefined;
|
|
49265
|
+
overlayOwnedSelections.delete(this);
|
|
49266
|
+
}
|
|
49240
49267
|
isPiTuiMouseSequence(data) {
|
|
49241
49268
|
if (parseMouseSequences(data))
|
|
49242
49269
|
return true;
|
|
@@ -49313,6 +49340,7 @@ var init_interactive_tui = __esm(() => {
|
|
|
49313
49340
|
if (isLeftMouseButton(sequence))
|
|
49314
49341
|
viewportListener(sequence.data);
|
|
49315
49342
|
}
|
|
49343
|
+
overlayOwnedSelections.add(this);
|
|
49316
49344
|
}
|
|
49317
49345
|
replayViewportInput(viewportListener, data) {
|
|
49318
49346
|
viewportInputReplays.add(this);
|
|
@@ -49380,7 +49408,11 @@ var init_interactive_tui = __esm(() => {
|
|
|
49380
49408
|
});
|
|
49381
49409
|
|
|
49382
49410
|
// src/modes/interactive/interactive-mode-base.ts
|
|
49383
|
-
import {
|
|
49411
|
+
import {
|
|
49412
|
+
isKeyRelease as isKeyRelease3,
|
|
49413
|
+
isViewportTUI,
|
|
49414
|
+
setCapabilityOverrides as setCapabilityOverrides4
|
|
49415
|
+
} from "@earendil-works/pi-tui";
|
|
49384
49416
|
function isFullscreenViewportAction(data, keybindings) {
|
|
49385
49417
|
return FULLSCREEN_VIEWPORT_ACTIONS.some((action) => keybindings.matches(data, action));
|
|
49386
49418
|
}
|
|
@@ -49441,6 +49473,18 @@ class InteractiveModeBase {
|
|
|
49441
49473
|
return false;
|
|
49442
49474
|
return this.defaultEditor.handleInput(data);
|
|
49443
49475
|
}
|
|
49476
|
+
setFullscreenCopyOnSelect(enabled) {
|
|
49477
|
+
if (this.renderer.mode === "fullscreen")
|
|
49478
|
+
this.renderer.setCopyOnSelect(enabled);
|
|
49479
|
+
}
|
|
49480
|
+
getFullscreenCopyOnSelect() {
|
|
49481
|
+
return this.renderer.mode === "fullscreen" ? this.renderer.getCopyOnSelect() : undefined;
|
|
49482
|
+
}
|
|
49483
|
+
async copyActiveFullscreenSelection() {
|
|
49484
|
+
if (this.renderer.mode !== "fullscreen" || !this.renderer.hasActiveSelection())
|
|
49485
|
+
return;
|
|
49486
|
+
return this.renderer.copyActiveSelectionToClipboard();
|
|
49487
|
+
}
|
|
49444
49488
|
onRightClickPaste = () => {
|
|
49445
49489
|
this.handleRightClickPaste();
|
|
49446
49490
|
};
|
|
@@ -49640,11 +49684,13 @@ class InteractiveModeBase {
|
|
|
49640
49684
|
await this.rebindCurrentSession();
|
|
49641
49685
|
await this.themeController.applyFromSettings();
|
|
49642
49686
|
});
|
|
49687
|
+
setCapabilityOverrides4(this.settingsManager.getTerminalCapabilityOverrides());
|
|
49643
49688
|
this.version = VERSION;
|
|
49644
49689
|
this.renderer = createInteractiveTui({
|
|
49645
49690
|
showHardwareCursor: this.settingsManager.getShowHardwareCursor(),
|
|
49646
49691
|
logDirectory: runtimeHost.services.agentDir,
|
|
49647
49692
|
terminal: options.terminal,
|
|
49693
|
+
copyOnSelect: this.settingsManager.getFullscreenCopyOnSelect(),
|
|
49648
49694
|
onRightClickPaste: this.onRightClickPaste,
|
|
49649
49695
|
shouldHandleViewportInput: this.shouldHandleViewportInput,
|
|
49650
49696
|
onOverlayUnhandledInput: this.onOverlayUnhandledInput,
|
|
@@ -50767,6 +50813,7 @@ var init_interactive_deferred_startup = __esm(() => {
|
|
|
50767
50813
|
try {
|
|
50768
50814
|
await this.bindCurrentSessionExtensions();
|
|
50769
50815
|
await this.session.reload({ reason: "startup" });
|
|
50816
|
+
this.applyRuntimeSettings();
|
|
50770
50817
|
this.rebuildChatFromMessages();
|
|
50771
50818
|
if (!this.promptTurnWorkingLoaderActive) {
|
|
50772
50819
|
this.stopWorkingLoader();
|
|
@@ -51455,6 +51502,7 @@ ${warningLines}`, 0, 0));
|
|
|
51455
51502
|
});
|
|
51456
51503
|
|
|
51457
51504
|
// src/modes/interactive/interactive-session-runtime.ts
|
|
51505
|
+
import { setCapabilityOverrides as setCapabilityOverrides5 } from "@earendil-works/pi-tui";
|
|
51458
51506
|
var init_interactive_session_runtime = __esm(() => {
|
|
51459
51507
|
init_interactive_mode_base();
|
|
51460
51508
|
init_interactive_mode_deps();
|
|
@@ -51541,6 +51589,8 @@ var init_interactive_session_runtime = __esm(() => {
|
|
|
51541
51589
|
}
|
|
51542
51590
|
};
|
|
51543
51591
|
InteractiveModeBase.prototype.applyRuntimeSettings = function() {
|
|
51592
|
+
setCapabilityOverrides5(this.settingsManager.getTerminalCapabilityOverrides());
|
|
51593
|
+
this.setFullscreenCopyOnSelect(this.settingsManager.getFullscreenCopyOnSelect());
|
|
51544
51594
|
this.transcriptScrollView?.setScrollbar(this.settingsManager.getFullscreenScrollbar());
|
|
51545
51595
|
this.footer.setSession(this.session);
|
|
51546
51596
|
this.usageMeter.setSession(this.session);
|
|
@@ -53057,6 +53107,9 @@ var init_interactive_input_handling = __esm(() => {
|
|
|
53057
53107
|
});
|
|
53058
53108
|
this.defaultEditor.onAction("app.message.followUp", () => this.handleFollowUp());
|
|
53059
53109
|
this.defaultEditor.onAction("app.message.dequeue", () => this.handleDequeue());
|
|
53110
|
+
this.defaultEditor.onAction("app.message.copy", () => {
|
|
53111
|
+
this.handleCopyCommand({ preferSelection: true });
|
|
53112
|
+
});
|
|
53060
53113
|
this.defaultEditor.onAction("app.session.new", () => this.handleClearCommand());
|
|
53061
53114
|
this.defaultEditor.onAction("app.session.tree", () => this.showTreeSelector());
|
|
53062
53115
|
this.defaultEditor.onAction("app.session.fork", () => this.showUserMessageSelector());
|
|
@@ -54981,7 +55034,7 @@ var init_interactive_selectors = __esm(() => {
|
|
|
54981
55034
|
};
|
|
54982
55035
|
InteractiveModeBase.prototype.showFastModeSelector = function() {
|
|
54983
55036
|
if (!this.hasCodexFastModeSupportedModels()) {
|
|
54984
|
-
this.showWarning("
|
|
55037
|
+
this.showWarning("Fast mode isn't available for any configured model.");
|
|
54985
55038
|
return;
|
|
54986
55039
|
}
|
|
54987
55040
|
this.showSelector((done) => {
|
|
@@ -55040,6 +55093,7 @@ var init_interactive_selectors = __esm(() => {
|
|
|
55040
55093
|
showHardwareCursor: this.settingsManager.getShowHardwareCursor(),
|
|
55041
55094
|
fullscreenScrollbar: this.settingsManager.getFullscreenScrollbar(),
|
|
55042
55095
|
fullscreenExitOutput: this.settingsManager.getFullscreenExitOutput(),
|
|
55096
|
+
fullscreenCopyOnSelect: this.settingsManager.getFullscreenCopyOnSelect(),
|
|
55043
55097
|
editorPaddingX: this.settingsManager.getEditorPaddingX(),
|
|
55044
55098
|
outputPad: this.settingsManager.getOutputPad(),
|
|
55045
55099
|
showCacheMissNotices: this.settingsManager.getShowCacheMissNotices(),
|
|
@@ -55157,6 +55211,10 @@ var init_interactive_selectors = __esm(() => {
|
|
|
55157
55211
|
onFullscreenExitOutputChange: (output) => {
|
|
55158
55212
|
this.settingsManager.setFullscreenExitOutput(output);
|
|
55159
55213
|
},
|
|
55214
|
+
onFullscreenCopyOnSelectChange: (enabled) => {
|
|
55215
|
+
this.settingsManager.setFullscreenCopyOnSelect(enabled);
|
|
55216
|
+
this.setFullscreenCopyOnSelect(enabled);
|
|
55217
|
+
},
|
|
55160
55218
|
onEditorPaddingXChange: (padding) => {
|
|
55161
55219
|
this.settingsManager.setEditorPaddingX(padding);
|
|
55162
55220
|
this.defaultEditor.setPaddingX(padding);
|
|
@@ -56143,18 +56201,8 @@ var init_interactive_slash_commands = __esm(() => {
|
|
|
56143
56201
|
activeHeader.setExpanded(this.toolOutputExpanded);
|
|
56144
56202
|
}
|
|
56145
56203
|
setRegisteredThemes(this.session.resourceLoader.getThemes().themes);
|
|
56146
|
-
this.
|
|
56204
|
+
this.applyRuntimeSettings();
|
|
56147
56205
|
await this.themeController.applyFromSettings();
|
|
56148
|
-
const editorPaddingX = this.settingsManager.getEditorPaddingX();
|
|
56149
|
-
const autocompleteMaxVisible = this.settingsManager.getAutocompleteMaxVisible();
|
|
56150
|
-
this.defaultEditor.setPaddingX(editorPaddingX);
|
|
56151
|
-
this.defaultEditor.setAutocompleteMaxVisible(autocompleteMaxVisible);
|
|
56152
|
-
if (this.editor !== this.defaultEditor) {
|
|
56153
|
-
this.editor.setPaddingX?.(editorPaddingX);
|
|
56154
|
-
this.editor.setAutocompleteMaxVisible?.(autocompleteMaxVisible);
|
|
56155
|
-
}
|
|
56156
|
-
this.ui.setShowHardwareCursor(this.settingsManager.getShowHardwareCursor());
|
|
56157
|
-
this.ui.setClearOnShrink(this.settingsManager.getClearOnShrink());
|
|
56158
56206
|
this.setupAutocompleteProvider();
|
|
56159
56207
|
const runner = this.session.extensionRunner;
|
|
56160
56208
|
this.setupExtensionShortcuts(runner);
|
|
@@ -56347,7 +56395,12 @@ Gist: ${hyperlink3(gistUrl, gistUrl)}`);
|
|
|
56347
56395
|
}
|
|
56348
56396
|
}
|
|
56349
56397
|
};
|
|
56350
|
-
InteractiveModeBase.prototype.handleCopyCommand = async function() {
|
|
56398
|
+
InteractiveModeBase.prototype.handleCopyCommand = async function(options = {}) {
|
|
56399
|
+
if (options.preferSelection && this.getFullscreenCopyOnSelect() === false) {
|
|
56400
|
+
const selectionCopied = await this.copyActiveFullscreenSelection();
|
|
56401
|
+
if (selectionCopied !== undefined)
|
|
56402
|
+
return;
|
|
56403
|
+
}
|
|
56351
56404
|
const text = this.session.getLastAssistantText();
|
|
56352
56405
|
if (!text) {
|
|
56353
56406
|
this.showError("No agent messages to copy yet.");
|
|
@@ -56894,6 +56947,7 @@ var init_rpc_extension_ui = __esm(() => {
|
|
|
56894
56947
|
});
|
|
56895
56948
|
|
|
56896
56949
|
// src/modes/rpc/rpc-session-binding.ts
|
|
56950
|
+
import { setCapabilityOverrides as setCapabilityOverrides6 } from "@earendil-works/pi-tui";
|
|
56897
56951
|
var init_rpc_session_binding = __esm(() => {
|
|
56898
56952
|
init_footer_data_provider();
|
|
56899
56953
|
init_output_guard();
|
|
@@ -56970,7 +57024,7 @@ var init_config_selector = __esm(() => {
|
|
|
56970
57024
|
});
|
|
56971
57025
|
|
|
56972
57026
|
// src/cli/config-selector.ts
|
|
56973
|
-
import { ProcessTerminal as ProcessTerminal6, TuiMainScreen as TuiMainScreen8 } from "@earendil-works/pi-tui";
|
|
57027
|
+
import { ProcessTerminal as ProcessTerminal6, setCapabilityOverrides as setCapabilityOverrides7, TuiMainScreen as TuiMainScreen8 } from "@earendil-works/pi-tui";
|
|
56974
57028
|
var init_config_selector2 = __esm(() => {
|
|
56975
57029
|
init_config_selector();
|
|
56976
57030
|
init_theme();
|
|
@@ -57017,6 +57071,7 @@ var init_package_manager_cli = __esm(() => {
|
|
|
57017
57071
|
});
|
|
57018
57072
|
|
|
57019
57073
|
// src/main.ts
|
|
57074
|
+
import { setCapabilityOverrides as setCapabilityOverrides8 } from "@earendil-works/pi-tui";
|
|
57020
57075
|
import chalk15 from "chalk";
|
|
57021
57076
|
var init_main = __esm(() => {
|
|
57022
57077
|
init_args();
|
|
@@ -57031,6 +57086,7 @@ var init_main = __esm(() => {
|
|
|
57031
57086
|
init_auth_storage();
|
|
57032
57087
|
init_builtin_packages();
|
|
57033
57088
|
init_http_dispatcher();
|
|
57089
|
+
init_mandatory_resource_loader();
|
|
57034
57090
|
init_model_resolver();
|
|
57035
57091
|
init_model_runtime();
|
|
57036
57092
|
init_output_guard();
|