@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
|
@@ -9224,11 +9224,13 @@ function runSynchronousCallback(descriptor, callback) {
|
|
|
9224
9224
|
}
|
|
9225
9225
|
}
|
|
9226
9226
|
async function runCallback(descriptor, callback) {
|
|
9227
|
+
if (!reporter)
|
|
9228
|
+
return callback();
|
|
9229
|
+
await yieldToEventLoop();
|
|
9227
9230
|
const active = beginActivity(descriptor);
|
|
9228
9231
|
if (!active)
|
|
9229
9232
|
return callback();
|
|
9230
9233
|
try {
|
|
9231
|
-
await yieldToEventLoop();
|
|
9232
9234
|
return await callback();
|
|
9233
9235
|
} finally {
|
|
9234
9236
|
active.reporter.finished(active.activity.id);
|
|
@@ -11960,12 +11962,34 @@ var init_runner_events = __esm(() => {
|
|
|
11960
11962
|
init_callback_activity();
|
|
11961
11963
|
});
|
|
11962
11964
|
|
|
11965
|
+
// src/core/mandatory-runtime-tools.ts
|
|
11966
|
+
function isTrustedMandatoryRuntimeTool(registration) {
|
|
11967
|
+
return MANDATORY_TOOL_NAMES.has(registration.definition.name) && TRUSTED_MANDATORY_DEFINITIONS.has(registration.definition);
|
|
11968
|
+
}
|
|
11969
|
+
function isMandatoryRuntimeTool(name) {
|
|
11970
|
+
return MANDATORY_TOOL_NAMES.has(name);
|
|
11971
|
+
}
|
|
11972
|
+
function appendRegisteredMandatoryTools(tools, registry) {
|
|
11973
|
+
for (const name of MANDATORY_TOOL_NAMES) {
|
|
11974
|
+
const tool = registry.get(name);
|
|
11975
|
+
if (tool && !tools.some((candidate) => candidate.name === name))
|
|
11976
|
+
tools.push(tool);
|
|
11977
|
+
}
|
|
11978
|
+
return tools;
|
|
11979
|
+
}
|
|
11980
|
+
var MANDATORY_TOOL_NAMES, TRUSTED_MANDATORY_DEFINITIONS;
|
|
11981
|
+
var init_mandatory_runtime_tools = __esm(() => {
|
|
11982
|
+
MANDATORY_TOOL_NAMES = new Set(["intercom"]);
|
|
11983
|
+
TRUSTED_MANDATORY_DEFINITIONS = new WeakSet;
|
|
11984
|
+
});
|
|
11985
|
+
|
|
11963
11986
|
// src/core/extensions/runner-registries.ts
|
|
11964
11987
|
function collectRegisteredTools(extensions) {
|
|
11965
11988
|
const toolsByName = new Map;
|
|
11966
11989
|
for (const ext of extensions) {
|
|
11967
11990
|
for (const tool of ext.tools.values()) {
|
|
11968
|
-
|
|
11991
|
+
const existing = toolsByName.get(tool.definition.name);
|
|
11992
|
+
if (!existing || isMandatoryRuntimeTool(tool.definition.name) && isTrustedMandatoryRuntimeTool(tool)) {
|
|
11969
11993
|
toolsByName.set(tool.definition.name, tool);
|
|
11970
11994
|
}
|
|
11971
11995
|
}
|
|
@@ -11973,13 +11997,16 @@ function collectRegisteredTools(extensions) {
|
|
|
11973
11997
|
return Array.from(toolsByName.values());
|
|
11974
11998
|
}
|
|
11975
11999
|
function findToolDefinition(extensions, toolName) {
|
|
12000
|
+
let first;
|
|
11976
12001
|
for (const ext of extensions) {
|
|
11977
12002
|
const tool = ext.tools.get(toolName);
|
|
11978
|
-
if (tool)
|
|
12003
|
+
if (!tool)
|
|
12004
|
+
continue;
|
|
12005
|
+
first ??= tool;
|
|
12006
|
+
if (isMandatoryRuntimeTool(toolName) && isTrustedMandatoryRuntimeTool(tool))
|
|
11979
12007
|
return tool.definition;
|
|
11980
|
-
}
|
|
11981
12008
|
}
|
|
11982
|
-
return;
|
|
12009
|
+
return first?.definition;
|
|
11983
12010
|
}
|
|
11984
12011
|
function collectFlags(extensions) {
|
|
11985
12012
|
const allFlags = new Map;
|
|
@@ -12047,6 +12074,9 @@ function resolveRegisteredCommands(extensions) {
|
|
|
12047
12074
|
return { ...command, invocationName };
|
|
12048
12075
|
});
|
|
12049
12076
|
}
|
|
12077
|
+
var init_runner_registries = __esm(() => {
|
|
12078
|
+
init_mandatory_runtime_tools();
|
|
12079
|
+
});
|
|
12050
12080
|
|
|
12051
12081
|
// src/core/extensions/runner-shortcuts.ts
|
|
12052
12082
|
function resolveExtensionShortcuts(extensions, resolvedKeybindings, hasUI) {
|
|
@@ -12110,6 +12140,7 @@ var init_runner_shortcuts = __esm(() => {
|
|
|
12110
12140
|
"app.thinking.toggle",
|
|
12111
12141
|
"app.editor.external",
|
|
12112
12142
|
"app.message.followUp",
|
|
12143
|
+
"app.message.copy",
|
|
12113
12144
|
"tui.input.submit",
|
|
12114
12145
|
"tui.select.confirm",
|
|
12115
12146
|
"tui.select.cancel",
|
|
@@ -12573,6 +12604,7 @@ var init_runner = __esm(() => {
|
|
|
12573
12604
|
init_loader_runtime();
|
|
12574
12605
|
init_runner_context();
|
|
12575
12606
|
init_runner_events();
|
|
12607
|
+
init_runner_registries();
|
|
12576
12608
|
init_runner_shortcuts();
|
|
12577
12609
|
init_runner_ui();
|
|
12578
12610
|
init_stale_context();
|
|
@@ -16173,14 +16205,13 @@ function getToolDefinition(name) {
|
|
|
16173
16205
|
}
|
|
16174
16206
|
function setActiveToolsByName(toolNames) {
|
|
16175
16207
|
const tools = [];
|
|
16176
|
-
const validToolNames = [];
|
|
16177
16208
|
for (const name of toolNames) {
|
|
16178
16209
|
const tool = this._toolRegistry.get(name);
|
|
16179
|
-
if (tool)
|
|
16210
|
+
if (tool)
|
|
16180
16211
|
tools.push(tool);
|
|
16181
|
-
validToolNames.push(name);
|
|
16182
|
-
}
|
|
16183
16212
|
}
|
|
16213
|
+
appendRegisteredMandatoryTools(tools, this._toolRegistry);
|
|
16214
|
+
const validToolNames = tools.map((tool) => tool.name);
|
|
16184
16215
|
this.agent.state.tools = tools;
|
|
16185
16216
|
this._baseSystemPrompt = this._rebuildSystemPrompt(validToolNames);
|
|
16186
16217
|
this.agent.state.systemPrompt = this._systemPromptOverride ?? this._baseSystemPrompt;
|
|
@@ -16237,7 +16268,7 @@ function _rebuildSystemPrompt(toolNames) {
|
|
|
16237
16268
|
customPrompt: loaderSystemPrompt,
|
|
16238
16269
|
appendSystemPrompt,
|
|
16239
16270
|
selectedTools: validToolNames,
|
|
16240
|
-
excludedTools: this._excludedToolNames ? Array.from(this._excludedToolNames) : undefined,
|
|
16271
|
+
excludedTools: this._excludedToolNames ? Array.from(this._excludedToolNames).filter((name) => !isMandatoryRuntimeTool(name)) : undefined,
|
|
16241
16272
|
toolSnippets,
|
|
16242
16273
|
promptGuidelines
|
|
16243
16274
|
};
|
|
@@ -16250,6 +16281,7 @@ function _refreshBaseSystemPromptFromActiveTools() {
|
|
|
16250
16281
|
}
|
|
16251
16282
|
var agentSessionStateMethods;
|
|
16252
16283
|
var init_agent_session_state = __esm(() => {
|
|
16284
|
+
init_mandatory_runtime_tools();
|
|
16253
16285
|
init_skill_catalog();
|
|
16254
16286
|
init_system_prompt();
|
|
16255
16287
|
agentSessionStateMethods = {
|
|
@@ -17278,31 +17310,14 @@ function _installAgentToolHooks() {
|
|
|
17278
17310
|
function _installAgentNextTurnRefresh() {
|
|
17279
17311
|
const previousPrepareNextTurnWithContext = this.agent.prepareNextTurnWithContext ?? (this.agent.prepareNextTurn ? async (_turn, signal) => await this.agent.prepareNextTurn?.(signal) : undefined);
|
|
17280
17312
|
const previousShouldStopAfterTurn = this.agent.shouldStopAfterTurn;
|
|
17281
|
-
let pendingStopResult;
|
|
17282
|
-
const pendingStopMatches = (turn) => {
|
|
17283
|
-
const pending = pendingStopResult;
|
|
17284
|
-
return pending?.message === turn.message && pending.toolResults === turn.toolResults && pending.newMessages === turn.newMessages;
|
|
17285
|
-
};
|
|
17286
|
-
const clearPendingStopResult = (turn) => {
|
|
17287
|
-
if (pendingStopMatches(turn))
|
|
17288
|
-
pendingStopResult = undefined;
|
|
17289
|
-
};
|
|
17290
17313
|
this.agent.shouldStopAfterTurn = async (turn, signal) => {
|
|
17291
|
-
const
|
|
17292
|
-
|
|
17293
|
-
|
|
17294
|
-
|
|
17295
|
-
}
|
|
17296
|
-
return await previousShouldStopAfterTurn?.(turn, signal) ?? false;
|
|
17297
|
-
};
|
|
17298
|
-
const cacheStopResult = async (turn, signal) => {
|
|
17314
|
+
const toolCallIds = turn.message.content.filter((part) => part.type === "toolCall").map((part) => part.id);
|
|
17315
|
+
const terminatingBatch = toolCallIds.length > 0 && toolCallIds.every((id) => this._terminatingToolCallIds.has(id));
|
|
17316
|
+
for (const id of toolCallIds)
|
|
17317
|
+
this._terminatingToolCallIds.delete(id);
|
|
17299
17318
|
const shouldStop = await previousShouldStopAfterTurn?.(turn, signal) ?? false;
|
|
17300
|
-
|
|
17301
|
-
|
|
17302
|
-
toolResults: turn.toolResults,
|
|
17303
|
-
newMessages: turn.newMessages,
|
|
17304
|
-
shouldStop
|
|
17305
|
-
};
|
|
17319
|
+
this._stopAfterTurnBlockedContinuation = shouldStop;
|
|
17320
|
+
await settleFallbackAfterTurn(this, turn, terminatingBatch);
|
|
17306
17321
|
return shouldStop;
|
|
17307
17322
|
};
|
|
17308
17323
|
const previousTransformContext = this.agent.transformContext;
|
|
@@ -17330,68 +17345,7 @@ function _installAgentNextTurnRefresh() {
|
|
|
17330
17345
|
thinkingLevel: this.agent.state.thinkingLevel
|
|
17331
17346
|
};
|
|
17332
17347
|
};
|
|
17333
|
-
|
|
17334
|
-
const prepareDeferredTurn = async (loopConfig) => {
|
|
17335
|
-
const deferred = deferredPreparation;
|
|
17336
|
-
if (!deferred)
|
|
17337
|
-
return;
|
|
17338
|
-
deferredPreparation = undefined;
|
|
17339
|
-
const snapshot = await prepareTurn(deferred.turn, deferred.signal);
|
|
17340
|
-
const nextContext = snapshot.context ?? deferred.turn.context;
|
|
17341
|
-
deferred.loopContext.systemPrompt = nextContext.systemPrompt;
|
|
17342
|
-
deferred.loopContext.messages = nextContext.messages;
|
|
17343
|
-
deferred.loopContext.tools = nextContext.tools;
|
|
17344
|
-
loopConfig.model = snapshot.model ?? loopConfig.model;
|
|
17345
|
-
loopConfig.reasoning = snapshot.thinkingLevel === undefined ? loopConfig.reasoning : snapshot.thinkingLevel === "off" ? undefined : snapshot.thinkingLevel;
|
|
17346
|
-
};
|
|
17347
|
-
const agentLoopDoor = this.agent;
|
|
17348
|
-
const previousCreateLoopConfig = agentLoopDoor.createLoopConfig.bind(this.agent);
|
|
17349
|
-
agentLoopDoor.createLoopConfig = (options) => {
|
|
17350
|
-
deferredPreparation = undefined;
|
|
17351
|
-
this._stopAfterTurnBlockedContinuation = false;
|
|
17352
|
-
const loopConfig = previousCreateLoopConfig(options);
|
|
17353
|
-
const wrapQueuePoll = (poll) => async function() {
|
|
17354
|
-
const messages = await poll?.() ?? [];
|
|
17355
|
-
if (messages.length > 0)
|
|
17356
|
-
await prepareDeferredTurn(this);
|
|
17357
|
-
return messages;
|
|
17358
|
-
};
|
|
17359
|
-
loopConfig.getSteeringMessages = wrapQueuePoll(loopConfig.getSteeringMessages);
|
|
17360
|
-
loopConfig.getFollowUpMessages = wrapQueuePoll(loopConfig.getFollowUpMessages);
|
|
17361
|
-
return loopConfig;
|
|
17362
|
-
};
|
|
17363
|
-
this.agent.prepareNextTurnWithContext = async (turn, signal) => {
|
|
17364
|
-
const toolCallIds = turn.message.content.filter((part) => part.type === "toolCall").map((part) => part.id);
|
|
17365
|
-
const terminatingBatch = toolCallIds.length > 0 && toolCallIds.every((id) => this._terminatingToolCallIds.has(id));
|
|
17366
|
-
for (const id of toolCallIds)
|
|
17367
|
-
this._terminatingToolCallIds.delete(id);
|
|
17368
|
-
const shouldStop = await cacheStopResult(turn, signal);
|
|
17369
|
-
try {
|
|
17370
|
-
if (shouldStop) {
|
|
17371
|
-
deferredPreparation = undefined;
|
|
17372
|
-
this._stopAfterTurnBlockedContinuation = true;
|
|
17373
|
-
await settleFallbackAfterTurn(this, turn, terminatingBatch);
|
|
17374
|
-
return;
|
|
17375
|
-
}
|
|
17376
|
-
if (turn.toolResults.length > 0 && !terminatingBatch) {
|
|
17377
|
-
deferredPreparation = undefined;
|
|
17378
|
-
const snapshot = await prepareTurn(turn, signal);
|
|
17379
|
-
await settleFallbackAfterTurn(this, turn, terminatingBatch);
|
|
17380
|
-
return snapshot;
|
|
17381
|
-
}
|
|
17382
|
-
await settleFallbackAfterTurn(this, turn, terminatingBatch);
|
|
17383
|
-
const loopContext = {
|
|
17384
|
-
...turn.context,
|
|
17385
|
-
messages: turn.context.messages.slice(),
|
|
17386
|
-
tools: turn.context.tools?.slice()
|
|
17387
|
-
};
|
|
17388
|
-
deferredPreparation = { turn, signal, loopContext };
|
|
17389
|
-
return { context: loopContext };
|
|
17390
|
-
} catch (error) {
|
|
17391
|
-
clearPendingStopResult(turn);
|
|
17392
|
-
throw error;
|
|
17393
|
-
}
|
|
17394
|
-
};
|
|
17348
|
+
this.agent.prepareNextTurnWithContext = prepareTurn;
|
|
17395
17349
|
}
|
|
17396
17350
|
async function settleFallbackAfterTurn(session, turn, terminatingBatch) {
|
|
17397
17351
|
const preserveFallbackForFailure = turn.message.role === "assistant" && !session.agent.hasQueuedMessages() && (turn.message.stopReason === "length" || session._isEmptyCompletion?.(turn.message) === true || session._isSafetyRefusal?.(turn.message) === true);
|
|
@@ -17481,6 +17435,7 @@ var init_loader_virtual_modules = __esm(() => {
|
|
|
17481
17435
|
});
|
|
17482
17436
|
|
|
17483
17437
|
// src/core/extensions/loader-core.ts
|
|
17438
|
+
var runtimeEventBuses;
|
|
17484
17439
|
var init_loader_core = __esm(() => {
|
|
17485
17440
|
init_event_loop();
|
|
17486
17441
|
init_paths();
|
|
@@ -17490,6 +17445,7 @@ var init_loader_core = __esm(() => {
|
|
|
17490
17445
|
init_loader_resources();
|
|
17491
17446
|
init_loader_runtime();
|
|
17492
17447
|
init_loader_virtual_modules();
|
|
17448
|
+
runtimeEventBuses = new WeakMap;
|
|
17493
17449
|
});
|
|
17494
17450
|
|
|
17495
17451
|
// src/core/package-manager-manifest.ts
|
|
@@ -22583,7 +22539,7 @@ class FastModeSelectorComponent {
|
|
|
22583
22539
|
}
|
|
22584
22540
|
invalidate() {}
|
|
22585
22541
|
render(width) {
|
|
22586
|
-
const lines = [truncateToWidth10(theme.bold(theme.fg("accent", "
|
|
22542
|
+
const lines = [truncateToWidth10(theme.bold(theme.fg("accent", "Fast mode")), width)];
|
|
22587
22543
|
for (const line of wrapTextWithAnsi3(DESCRIPTION, Math.max(20, width))) {
|
|
22588
22544
|
lines.push(theme.fg("muted", line));
|
|
22589
22545
|
}
|
|
@@ -22666,7 +22622,7 @@ class FastModeSelectorComponent {
|
|
|
22666
22622
|
return this.getFocusedRow() === row ? theme.fg("muted", text) : theme.fg("dim", text);
|
|
22667
22623
|
}
|
|
22668
22624
|
}
|
|
22669
|
-
var ROWS, LABEL_WIDTH = 16, DESCRIPTION = "
|
|
22625
|
+
var ROWS, LABEL_WIDTH = 16, DESCRIPTION = "Use faster routing for the selected model when supported by its provider.", ROW_DETAILS;
|
|
22670
22626
|
var init_fast_mode_selector = __esm(() => {
|
|
22671
22627
|
init_theme();
|
|
22672
22628
|
ROWS = ["chat", "workflow"];
|
|
@@ -23893,6 +23849,10 @@ var init_keybindings = __esm(() => {
|
|
|
23893
23849
|
defaultKeys: windowsKeybindings ? "alt+q" : "alt+up",
|
|
23894
23850
|
description: "Restore queued messages"
|
|
23895
23851
|
},
|
|
23852
|
+
"app.message.copy": {
|
|
23853
|
+
defaultKeys: "ctrl+x",
|
|
23854
|
+
description: "Copy fullscreen selection or last agent message"
|
|
23855
|
+
},
|
|
23896
23856
|
"app.clipboard.pasteImage": {
|
|
23897
23857
|
defaultKeys: windowsKeybindings ? "alt+v" : "ctrl+v",
|
|
23898
23858
|
description: "Paste image from clipboard (text fallback)"
|
|
@@ -25278,6 +25238,9 @@ function createSettingsChangeHandler(callbacks) {
|
|
|
25278
25238
|
case "fullscreen-exit-output":
|
|
25279
25239
|
callbacks.onFullscreenExitOutputChange(newValue);
|
|
25280
25240
|
break;
|
|
25241
|
+
case "fullscreen-copy-on-select":
|
|
25242
|
+
callbacks.onFullscreenCopyOnSelectChange(newValue === "true");
|
|
25243
|
+
break;
|
|
25281
25244
|
case "editor-padding":
|
|
25282
25245
|
callbacks.onEditorPaddingXChange(parseInt(newValue, 10));
|
|
25283
25246
|
break;
|
|
@@ -25665,6 +25628,13 @@ function insertUiToggles(items, config) {
|
|
|
25665
25628
|
values: ["transcript", "resume-hint"]
|
|
25666
25629
|
});
|
|
25667
25630
|
insertAfter(items, "fullscreen-exit-output", {
|
|
25631
|
+
id: "fullscreen-copy-on-select",
|
|
25632
|
+
label: "Fullscreen copy on select",
|
|
25633
|
+
description: "Copy selected transcript text automatically on mouse release",
|
|
25634
|
+
currentValue: config.fullscreenCopyOnSelect ? "true" : "false",
|
|
25635
|
+
values: ["true", "false"]
|
|
25636
|
+
});
|
|
25637
|
+
insertAfter(items, "fullscreen-copy-on-select", {
|
|
25668
25638
|
id: "editor-padding",
|
|
25669
25639
|
label: "Editor padding",
|
|
25670
25640
|
description: "Horizontal padding for input editor (0-3)",
|
|
@@ -38739,6 +38709,8 @@ function _refreshToolRegistry(options) {
|
|
|
38739
38709
|
const allowedToolNames = this._allowedToolNames;
|
|
38740
38710
|
const excludedToolNames = this._excludedToolNames;
|
|
38741
38711
|
const isExposedTool = (name) => {
|
|
38712
|
+
if (isMandatoryRuntimeTool(name))
|
|
38713
|
+
return true;
|
|
38742
38714
|
if (allowedToolNames && !allowedToolNames.has(name)) {
|
|
38743
38715
|
return false;
|
|
38744
38716
|
}
|
|
@@ -38747,10 +38719,10 @@ function _refreshToolRegistry(options) {
|
|
|
38747
38719
|
}
|
|
38748
38720
|
return true;
|
|
38749
38721
|
};
|
|
38750
|
-
const registeredTools = this._extensionRunner.getAllRegisteredTools();
|
|
38722
|
+
const registeredTools = this._extensionRunner.getAllRegisteredTools().filter((tool) => !isMandatoryRuntimeTool(tool.definition.name) || isTrustedMandatoryRuntimeTool(tool));
|
|
38751
38723
|
const allCustomTools = [
|
|
38752
38724
|
...registeredTools,
|
|
38753
|
-
...this._customTools.map((definition) => ({
|
|
38725
|
+
...this._customTools.filter((definition) => !isMandatoryRuntimeTool(definition.name)).map((definition) => ({
|
|
38754
38726
|
definition,
|
|
38755
38727
|
sourceInfo: createSyntheticSourceInfo(`<sdk:${definition.name}>`, { source: "sdk" })
|
|
38756
38728
|
}))
|
|
@@ -38871,6 +38843,7 @@ function _buildRuntime(options) {
|
|
|
38871
38843
|
var agentSessionToolRegistryMethods;
|
|
38872
38844
|
var init_agent_session_tool_registry = __esm(() => {
|
|
38873
38845
|
init_extensions();
|
|
38846
|
+
init_mandatory_runtime_tools();
|
|
38874
38847
|
init_model_registry();
|
|
38875
38848
|
init_tools();
|
|
38876
38849
|
init_session_temp_dir();
|
|
@@ -39862,11 +39835,12 @@ var init_builtin_packages = __esm(() => {
|
|
|
39862
39835
|
{ packageName: "@bastani/subagents", workspaceDirName: "subagents", distDirName: "subagents" },
|
|
39863
39836
|
{ packageName: "@bastani/mcp", workspaceDirName: "mcp", distDirName: "mcp" },
|
|
39864
39837
|
{ packageName: "@bastani/web-access", workspaceDirName: "web-access", distDirName: "web-access" },
|
|
39865
|
-
{ packageName: "@bastani/intercom", workspaceDirName: "intercom", distDirName: "intercom" }
|
|
39838
|
+
{ packageName: "@bastani/intercom", workspaceDirName: "intercom", distDirName: "intercom", mandatory: true }
|
|
39866
39839
|
];
|
|
39867
39840
|
BUILTIN_PACKAGES = WORKSPACE_BUILTINS.map((spec) => ({
|
|
39868
39841
|
packageName: spec.packageName,
|
|
39869
39842
|
distDirName: spec.distDirName,
|
|
39843
|
+
mandatory: spec.mandatory === true,
|
|
39870
39844
|
requiredEntries: requiredEntriesForBuiltin(spec.distDirName),
|
|
39871
39845
|
sourceCandidates: ({ here, packageDir, isSourceCheckout }) => isSourceCheckout ? [join37(packageDir, "..", spec.workspaceDirName), join37(here, "..", "..", "..", spec.workspaceDirName)] : []
|
|
39872
39846
|
}));
|
|
@@ -43331,7 +43305,9 @@ var init_resource_loader_extensions = __esm(() => {
|
|
|
43331
43305
|
var init_resource_loader_reload = __esm(() => {
|
|
43332
43306
|
init_event_loop();
|
|
43333
43307
|
init_paths();
|
|
43308
|
+
init_builtin_packages();
|
|
43334
43309
|
init_loader();
|
|
43310
|
+
init_mandatory_runtime_tools();
|
|
43335
43311
|
init_resource_loader_assets();
|
|
43336
43312
|
init_resource_loader_context_files();
|
|
43337
43313
|
init_resource_loader_discovery();
|
|
@@ -44488,6 +44464,28 @@ var init_settings_manager_ui_accessors = __esm(() => {
|
|
|
44488
44464
|
state.markModified("fullscreenExitOutput");
|
|
44489
44465
|
state.save();
|
|
44490
44466
|
},
|
|
44467
|
+
getFullscreenCopyOnSelect() {
|
|
44468
|
+
return settingsInternals(this).settings.fullscreenCopyOnSelect !== false;
|
|
44469
|
+
},
|
|
44470
|
+
setFullscreenCopyOnSelect(enabled) {
|
|
44471
|
+
const state = settingsInternals(this);
|
|
44472
|
+
state.globalSettings.fullscreenCopyOnSelect = enabled;
|
|
44473
|
+
state.markModified("fullscreenCopyOnSelect");
|
|
44474
|
+
state.save();
|
|
44475
|
+
},
|
|
44476
|
+
getTerminalCapabilityOverrides() {
|
|
44477
|
+
const terminal = settingsInternals(this).settings.terminal;
|
|
44478
|
+
const overrides = {};
|
|
44479
|
+
if (typeof terminal?.hyperlinks === "boolean")
|
|
44480
|
+
overrides.hyperlinks = terminal.hyperlinks;
|
|
44481
|
+
if (terminal?.images === "kitty" || terminal?.images === "iterm2")
|
|
44482
|
+
overrides.images = terminal.images;
|
|
44483
|
+
else if (terminal?.images === false)
|
|
44484
|
+
overrides.images = null;
|
|
44485
|
+
if (typeof terminal?.trueColor === "boolean")
|
|
44486
|
+
overrides.trueColor = terminal.trueColor;
|
|
44487
|
+
return overrides;
|
|
44488
|
+
},
|
|
44491
44489
|
getEditorPaddingX() {
|
|
44492
44490
|
return settingsInternals(this).settings.editorPaddingX ?? 0;
|
|
44493
44491
|
},
|
|
@@ -44633,6 +44631,14 @@ var init_resource_loader = __esm(() => {
|
|
|
44633
44631
|
init_resource_loader_core();
|
|
44634
44632
|
init_skill_catalog();
|
|
44635
44633
|
});
|
|
44634
|
+
// src/core/mandatory-resource-loader.ts
|
|
44635
|
+
var init_mandatory_resource_loader = __esm(() => {
|
|
44636
|
+
init_builtin_packages();
|
|
44637
|
+
init_loader();
|
|
44638
|
+
init_mandatory_runtime_tools();
|
|
44639
|
+
init_skill_catalog();
|
|
44640
|
+
});
|
|
44641
|
+
|
|
44636
44642
|
// src/core/model-resolver-defaults.ts
|
|
44637
44643
|
function findPreferredAvailableModel(availableModels) {
|
|
44638
44644
|
for (const [provider, defaultId] of Object.entries(defaultModelPerProvider)) {
|
|
@@ -45331,6 +45337,7 @@ var init_session_cwd = __esm(() => {
|
|
|
45331
45337
|
var init_agent_session_services = __esm(() => {
|
|
45332
45338
|
init_config();
|
|
45333
45339
|
init_paths();
|
|
45340
|
+
init_mandatory_resource_loader();
|
|
45334
45341
|
init_model_runtime();
|
|
45335
45342
|
init_resource_loader();
|
|
45336
45343
|
init_sdk();
|
|
@@ -45667,6 +45674,7 @@ var init_sdk = __esm(() => {
|
|
|
45667
45674
|
init_agent_session();
|
|
45668
45675
|
init_auth_guidance();
|
|
45669
45676
|
init_codex_fast_mode();
|
|
45677
|
+
init_mandatory_resource_loader();
|
|
45670
45678
|
init_messages();
|
|
45671
45679
|
init_model_resolver();
|
|
45672
45680
|
init_model_runtime();
|
|
@@ -45770,7 +45778,12 @@ var init_list_models = __esm(() => {
|
|
|
45770
45778
|
});
|
|
45771
45779
|
|
|
45772
45780
|
// src/cli/startup-ui.ts
|
|
45773
|
-
import {
|
|
45781
|
+
import {
|
|
45782
|
+
ProcessTerminal,
|
|
45783
|
+
setCapabilityOverrides,
|
|
45784
|
+
setKeybindings,
|
|
45785
|
+
TuiMainScreen
|
|
45786
|
+
} from "@earendil-works/pi-tui";
|
|
45774
45787
|
var init_startup_ui = __esm(() => {
|
|
45775
45788
|
init_config();
|
|
45776
45789
|
init_keybindings();
|
|
@@ -45858,7 +45871,7 @@ var init_main_first_time_setup = __esm(() => {
|
|
|
45858
45871
|
init_startup_ui();
|
|
45859
45872
|
});
|
|
45860
45873
|
// src/cli/session-picker.ts
|
|
45861
|
-
import { ProcessTerminal as ProcessTerminal2, setKeybindings as setKeybindings2, TuiMainScreen as TuiMainScreen2 } from "@earendil-works/pi-tui";
|
|
45874
|
+
import { ProcessTerminal as ProcessTerminal2, setCapabilityOverrides as setCapabilityOverrides2, setKeybindings as setKeybindings2, TuiMainScreen as TuiMainScreen2 } from "@earendil-works/pi-tui";
|
|
45862
45875
|
var init_session_picker = __esm(() => {
|
|
45863
45876
|
init_config();
|
|
45864
45877
|
init_keybindings();
|
|
@@ -45866,7 +45879,7 @@ var init_session_picker = __esm(() => {
|
|
|
45866
45879
|
});
|
|
45867
45880
|
|
|
45868
45881
|
// src/main-session.ts
|
|
45869
|
-
import { ProcessTerminal as ProcessTerminal3, setKeybindings as setKeybindings3, TuiMainScreen as TuiMainScreen3 } from "@earendil-works/pi-tui";
|
|
45882
|
+
import { ProcessTerminal as ProcessTerminal3, setCapabilityOverrides as setCapabilityOverrides3, setKeybindings as setKeybindings3, TuiMainScreen as TuiMainScreen3 } from "@earendil-works/pi-tui";
|
|
45870
45883
|
import chalk10 from "chalk";
|
|
45871
45884
|
var init_main_session = __esm(() => {
|
|
45872
45885
|
init_session_picker();
|
|
@@ -48684,7 +48697,7 @@ var init_slash_commands = __esm(() => {
|
|
|
48684
48697
|
{ name: "tree", description: "Navigate session tree (switch branches)" },
|
|
48685
48698
|
{ name: "thinking", description: "Set thinking level", argumentHint: "<level>" },
|
|
48686
48699
|
{ name: "scoped-models", description: "Enable/disable models for ctrl+p cycling" },
|
|
48687
|
-
{ name: "fast", description: "Configure
|
|
48700
|
+
{ name: "fast", description: "Configure fast mode for chat and workflows on supported models" },
|
|
48688
48701
|
{ name: "export", description: "Export session (HTML default, or specify path: .html/.jsonl)" },
|
|
48689
48702
|
{ name: "import", description: "Import and resume a session from a JSONL file" },
|
|
48690
48703
|
{ name: "share", description: "Share session as a secret GitHub gist" },
|
|
@@ -49310,6 +49323,7 @@ function createFullscreenTui(options) {
|
|
|
49310
49323
|
openUrl: openBrowser
|
|
49311
49324
|
}),
|
|
49312
49325
|
onRightClickPaste: options.onRightClickPaste,
|
|
49326
|
+
copyOnSelect: options.copyOnSelect,
|
|
49313
49327
|
copySelection: options.copySelection ?? copySelectionToHostClipboard
|
|
49314
49328
|
}, options.shouldHandleViewportInput, options.onOverlayUnhandledInput);
|
|
49315
49329
|
}
|
|
@@ -49351,7 +49365,7 @@ function createInteractiveTuiReference(getTui) {
|
|
|
49351
49365
|
getPrototypeOf: () => Reflect.getPrototypeOf(getTui())
|
|
49352
49366
|
});
|
|
49353
49367
|
}
|
|
49354
|
-
var viewportInputListeners, viewportInputGates, overlayUnhandledInputHandlers, viewportInputReplays, viewportInputSubscriptions, SGR_MOUSE_SEQUENCE, LEFT_MOUSE_MODIFIER_MASK, AtomicTuiAltScreen, AtomicTuiMainScreen;
|
|
49368
|
+
var viewportInputListeners, viewportInputGates, overlayUnhandledInputHandlers, viewportInputReplays, overlayOwnedSelections, viewportInputSubscriptions, SGR_MOUSE_SEQUENCE, LEFT_MOUSE_MODIFIER_MASK, AtomicTuiAltScreen, AtomicTuiMainScreen;
|
|
49355
49369
|
var init_interactive_tui = __esm(() => {
|
|
49356
49370
|
init_clipboard();
|
|
49357
49371
|
init_open_browser();
|
|
@@ -49360,6 +49374,7 @@ var init_interactive_tui = __esm(() => {
|
|
|
49360
49374
|
viewportInputGates = new WeakMap;
|
|
49361
49375
|
overlayUnhandledInputHandlers = new WeakMap;
|
|
49362
49376
|
viewportInputReplays = new WeakSet;
|
|
49377
|
+
overlayOwnedSelections = new WeakSet;
|
|
49363
49378
|
viewportInputSubscriptions = new WeakMap;
|
|
49364
49379
|
SGR_MOUSE_SEQUENCE = /^\x1b\[<(\d+);\d+;\d+([Mm])/;
|
|
49365
49380
|
LEFT_MOUSE_MODIFIER_MASK = 4 | 8 | 16;
|
|
@@ -49375,8 +49390,20 @@ var init_interactive_tui = __esm(() => {
|
|
|
49375
49390
|
deferral.shouldDeferViewportInputToOverlay = () => !viewportInputReplays.has(this) && deferToOverlay?.() === true;
|
|
49376
49391
|
}
|
|
49377
49392
|
applyLineResets(lines) {
|
|
49393
|
+
if (overlayOwnedSelections.has(this) && !this.isFocusedOverlay())
|
|
49394
|
+
this.clearOverlayOwnedSelection();
|
|
49378
49395
|
return stripOverlayActiveRowMarker(super.applyLineResets(lines));
|
|
49379
49396
|
}
|
|
49397
|
+
clearOverlayOwnedSelection() {
|
|
49398
|
+
const selection = this;
|
|
49399
|
+
selection.selectionAnchor = undefined;
|
|
49400
|
+
selection.selectionFocus = undefined;
|
|
49401
|
+
selection.selectionInitialRange = undefined;
|
|
49402
|
+
selection.selectionPressActive = false;
|
|
49403
|
+
selection.selectionDragged = false;
|
|
49404
|
+
selection.lastClick = undefined;
|
|
49405
|
+
overlayOwnedSelections.delete(this);
|
|
49406
|
+
}
|
|
49380
49407
|
isPiTuiMouseSequence(data) {
|
|
49381
49408
|
if (parseMouseSequences(data))
|
|
49382
49409
|
return true;
|
|
@@ -49453,6 +49480,7 @@ var init_interactive_tui = __esm(() => {
|
|
|
49453
49480
|
if (isLeftMouseButton(sequence))
|
|
49454
49481
|
viewportListener(sequence.data);
|
|
49455
49482
|
}
|
|
49483
|
+
overlayOwnedSelections.add(this);
|
|
49456
49484
|
}
|
|
49457
49485
|
replayViewportInput(viewportListener, data) {
|
|
49458
49486
|
viewportInputReplays.add(this);
|
|
@@ -49520,7 +49548,11 @@ var init_interactive_tui = __esm(() => {
|
|
|
49520
49548
|
});
|
|
49521
49549
|
|
|
49522
49550
|
// src/modes/interactive/interactive-mode-base.ts
|
|
49523
|
-
import {
|
|
49551
|
+
import {
|
|
49552
|
+
isKeyRelease as isKeyRelease3,
|
|
49553
|
+
isViewportTUI,
|
|
49554
|
+
setCapabilityOverrides as setCapabilityOverrides4
|
|
49555
|
+
} from "@earendil-works/pi-tui";
|
|
49524
49556
|
function isFullscreenViewportAction(data, keybindings) {
|
|
49525
49557
|
return FULLSCREEN_VIEWPORT_ACTIONS.some((action) => keybindings.matches(data, action));
|
|
49526
49558
|
}
|
|
@@ -49581,6 +49613,18 @@ class InteractiveModeBase {
|
|
|
49581
49613
|
return false;
|
|
49582
49614
|
return this.defaultEditor.handleInput(data);
|
|
49583
49615
|
}
|
|
49616
|
+
setFullscreenCopyOnSelect(enabled) {
|
|
49617
|
+
if (this.renderer.mode === "fullscreen")
|
|
49618
|
+
this.renderer.setCopyOnSelect(enabled);
|
|
49619
|
+
}
|
|
49620
|
+
getFullscreenCopyOnSelect() {
|
|
49621
|
+
return this.renderer.mode === "fullscreen" ? this.renderer.getCopyOnSelect() : undefined;
|
|
49622
|
+
}
|
|
49623
|
+
async copyActiveFullscreenSelection() {
|
|
49624
|
+
if (this.renderer.mode !== "fullscreen" || !this.renderer.hasActiveSelection())
|
|
49625
|
+
return;
|
|
49626
|
+
return this.renderer.copyActiveSelectionToClipboard();
|
|
49627
|
+
}
|
|
49584
49628
|
onRightClickPaste = () => {
|
|
49585
49629
|
this.handleRightClickPaste();
|
|
49586
49630
|
};
|
|
@@ -49780,11 +49824,13 @@ class InteractiveModeBase {
|
|
|
49780
49824
|
await this.rebindCurrentSession();
|
|
49781
49825
|
await this.themeController.applyFromSettings();
|
|
49782
49826
|
});
|
|
49827
|
+
setCapabilityOverrides4(this.settingsManager.getTerminalCapabilityOverrides());
|
|
49783
49828
|
this.version = VERSION;
|
|
49784
49829
|
this.renderer = createInteractiveTui({
|
|
49785
49830
|
showHardwareCursor: this.settingsManager.getShowHardwareCursor(),
|
|
49786
49831
|
logDirectory: runtimeHost.services.agentDir,
|
|
49787
49832
|
terminal: options.terminal,
|
|
49833
|
+
copyOnSelect: this.settingsManager.getFullscreenCopyOnSelect(),
|
|
49788
49834
|
onRightClickPaste: this.onRightClickPaste,
|
|
49789
49835
|
shouldHandleViewportInput: this.shouldHandleViewportInput,
|
|
49790
49836
|
onOverlayUnhandledInput: this.onOverlayUnhandledInput,
|
|
@@ -50907,6 +50953,7 @@ var init_interactive_deferred_startup = __esm(() => {
|
|
|
50907
50953
|
try {
|
|
50908
50954
|
await this.bindCurrentSessionExtensions();
|
|
50909
50955
|
await this.session.reload({ reason: "startup" });
|
|
50956
|
+
this.applyRuntimeSettings();
|
|
50910
50957
|
this.rebuildChatFromMessages();
|
|
50911
50958
|
if (!this.promptTurnWorkingLoaderActive) {
|
|
50912
50959
|
this.stopWorkingLoader();
|
|
@@ -51595,6 +51642,7 @@ ${warningLines}`, 0, 0));
|
|
|
51595
51642
|
});
|
|
51596
51643
|
|
|
51597
51644
|
// src/modes/interactive/interactive-session-runtime.ts
|
|
51645
|
+
import { setCapabilityOverrides as setCapabilityOverrides5 } from "@earendil-works/pi-tui";
|
|
51598
51646
|
var init_interactive_session_runtime = __esm(() => {
|
|
51599
51647
|
init_interactive_mode_base();
|
|
51600
51648
|
init_interactive_mode_deps();
|
|
@@ -51681,6 +51729,8 @@ var init_interactive_session_runtime = __esm(() => {
|
|
|
51681
51729
|
}
|
|
51682
51730
|
};
|
|
51683
51731
|
InteractiveModeBase.prototype.applyRuntimeSettings = function() {
|
|
51732
|
+
setCapabilityOverrides5(this.settingsManager.getTerminalCapabilityOverrides());
|
|
51733
|
+
this.setFullscreenCopyOnSelect(this.settingsManager.getFullscreenCopyOnSelect());
|
|
51684
51734
|
this.transcriptScrollView?.setScrollbar(this.settingsManager.getFullscreenScrollbar());
|
|
51685
51735
|
this.footer.setSession(this.session);
|
|
51686
51736
|
this.usageMeter.setSession(this.session);
|
|
@@ -53197,6 +53247,9 @@ var init_interactive_input_handling = __esm(() => {
|
|
|
53197
53247
|
});
|
|
53198
53248
|
this.defaultEditor.onAction("app.message.followUp", () => this.handleFollowUp());
|
|
53199
53249
|
this.defaultEditor.onAction("app.message.dequeue", () => this.handleDequeue());
|
|
53250
|
+
this.defaultEditor.onAction("app.message.copy", () => {
|
|
53251
|
+
this.handleCopyCommand({ preferSelection: true });
|
|
53252
|
+
});
|
|
53200
53253
|
this.defaultEditor.onAction("app.session.new", () => this.handleClearCommand());
|
|
53201
53254
|
this.defaultEditor.onAction("app.session.tree", () => this.showTreeSelector());
|
|
53202
53255
|
this.defaultEditor.onAction("app.session.fork", () => this.showUserMessageSelector());
|
|
@@ -55121,7 +55174,7 @@ var init_interactive_selectors = __esm(() => {
|
|
|
55121
55174
|
};
|
|
55122
55175
|
InteractiveModeBase.prototype.showFastModeSelector = function() {
|
|
55123
55176
|
if (!this.hasCodexFastModeSupportedModels()) {
|
|
55124
|
-
this.showWarning("
|
|
55177
|
+
this.showWarning("Fast mode isn't available for any configured model.");
|
|
55125
55178
|
return;
|
|
55126
55179
|
}
|
|
55127
55180
|
this.showSelector((done) => {
|
|
@@ -55180,6 +55233,7 @@ var init_interactive_selectors = __esm(() => {
|
|
|
55180
55233
|
showHardwareCursor: this.settingsManager.getShowHardwareCursor(),
|
|
55181
55234
|
fullscreenScrollbar: this.settingsManager.getFullscreenScrollbar(),
|
|
55182
55235
|
fullscreenExitOutput: this.settingsManager.getFullscreenExitOutput(),
|
|
55236
|
+
fullscreenCopyOnSelect: this.settingsManager.getFullscreenCopyOnSelect(),
|
|
55183
55237
|
editorPaddingX: this.settingsManager.getEditorPaddingX(),
|
|
55184
55238
|
outputPad: this.settingsManager.getOutputPad(),
|
|
55185
55239
|
showCacheMissNotices: this.settingsManager.getShowCacheMissNotices(),
|
|
@@ -55297,6 +55351,10 @@ var init_interactive_selectors = __esm(() => {
|
|
|
55297
55351
|
onFullscreenExitOutputChange: (output) => {
|
|
55298
55352
|
this.settingsManager.setFullscreenExitOutput(output);
|
|
55299
55353
|
},
|
|
55354
|
+
onFullscreenCopyOnSelectChange: (enabled) => {
|
|
55355
|
+
this.settingsManager.setFullscreenCopyOnSelect(enabled);
|
|
55356
|
+
this.setFullscreenCopyOnSelect(enabled);
|
|
55357
|
+
},
|
|
55300
55358
|
onEditorPaddingXChange: (padding) => {
|
|
55301
55359
|
this.settingsManager.setEditorPaddingX(padding);
|
|
55302
55360
|
this.defaultEditor.setPaddingX(padding);
|
|
@@ -56283,18 +56341,8 @@ var init_interactive_slash_commands = __esm(() => {
|
|
|
56283
56341
|
activeHeader.setExpanded(this.toolOutputExpanded);
|
|
56284
56342
|
}
|
|
56285
56343
|
setRegisteredThemes(this.session.resourceLoader.getThemes().themes);
|
|
56286
|
-
this.
|
|
56344
|
+
this.applyRuntimeSettings();
|
|
56287
56345
|
await this.themeController.applyFromSettings();
|
|
56288
|
-
const editorPaddingX = this.settingsManager.getEditorPaddingX();
|
|
56289
|
-
const autocompleteMaxVisible = this.settingsManager.getAutocompleteMaxVisible();
|
|
56290
|
-
this.defaultEditor.setPaddingX(editorPaddingX);
|
|
56291
|
-
this.defaultEditor.setAutocompleteMaxVisible(autocompleteMaxVisible);
|
|
56292
|
-
if (this.editor !== this.defaultEditor) {
|
|
56293
|
-
this.editor.setPaddingX?.(editorPaddingX);
|
|
56294
|
-
this.editor.setAutocompleteMaxVisible?.(autocompleteMaxVisible);
|
|
56295
|
-
}
|
|
56296
|
-
this.ui.setShowHardwareCursor(this.settingsManager.getShowHardwareCursor());
|
|
56297
|
-
this.ui.setClearOnShrink(this.settingsManager.getClearOnShrink());
|
|
56298
56346
|
this.setupAutocompleteProvider();
|
|
56299
56347
|
const runner = this.session.extensionRunner;
|
|
56300
56348
|
this.setupExtensionShortcuts(runner);
|
|
@@ -56487,7 +56535,12 @@ Gist: ${hyperlink3(gistUrl, gistUrl)}`);
|
|
|
56487
56535
|
}
|
|
56488
56536
|
}
|
|
56489
56537
|
};
|
|
56490
|
-
InteractiveModeBase.prototype.handleCopyCommand = async function() {
|
|
56538
|
+
InteractiveModeBase.prototype.handleCopyCommand = async function(options = {}) {
|
|
56539
|
+
if (options.preferSelection && this.getFullscreenCopyOnSelect() === false) {
|
|
56540
|
+
const selectionCopied = await this.copyActiveFullscreenSelection();
|
|
56541
|
+
if (selectionCopied !== undefined)
|
|
56542
|
+
return;
|
|
56543
|
+
}
|
|
56491
56544
|
const text = this.session.getLastAssistantText();
|
|
56492
56545
|
if (!text) {
|
|
56493
56546
|
this.showError("No agent messages to copy yet.");
|
|
@@ -57034,6 +57087,7 @@ var init_rpc_extension_ui = __esm(() => {
|
|
|
57034
57087
|
});
|
|
57035
57088
|
|
|
57036
57089
|
// src/modes/rpc/rpc-session-binding.ts
|
|
57090
|
+
import { setCapabilityOverrides as setCapabilityOverrides6 } from "@earendil-works/pi-tui";
|
|
57037
57091
|
var init_rpc_session_binding = __esm(() => {
|
|
57038
57092
|
init_footer_data_provider();
|
|
57039
57093
|
init_output_guard();
|
|
@@ -57110,7 +57164,7 @@ var init_config_selector = __esm(() => {
|
|
|
57110
57164
|
});
|
|
57111
57165
|
|
|
57112
57166
|
// src/cli/config-selector.ts
|
|
57113
|
-
import { ProcessTerminal as ProcessTerminal6, TuiMainScreen as TuiMainScreen8 } from "@earendil-works/pi-tui";
|
|
57167
|
+
import { ProcessTerminal as ProcessTerminal6, setCapabilityOverrides as setCapabilityOverrides7, TuiMainScreen as TuiMainScreen8 } from "@earendil-works/pi-tui";
|
|
57114
57168
|
var init_config_selector2 = __esm(() => {
|
|
57115
57169
|
init_config_selector();
|
|
57116
57170
|
init_theme();
|
|
@@ -57157,6 +57211,7 @@ var init_package_manager_cli = __esm(() => {
|
|
|
57157
57211
|
});
|
|
57158
57212
|
|
|
57159
57213
|
// src/main.ts
|
|
57214
|
+
import { setCapabilityOverrides as setCapabilityOverrides8 } from "@earendil-works/pi-tui";
|
|
57160
57215
|
import chalk15 from "chalk";
|
|
57161
57216
|
var init_main = __esm(() => {
|
|
57162
57217
|
init_args();
|
|
@@ -57171,6 +57226,7 @@ var init_main = __esm(() => {
|
|
|
57171
57226
|
init_auth_storage();
|
|
57172
57227
|
init_builtin_packages();
|
|
57173
57228
|
init_http_dispatcher();
|
|
57229
|
+
init_mandatory_resource_loader();
|
|
57174
57230
|
init_model_resolver();
|
|
57175
57231
|
init_model_runtime();
|
|
57176
57232
|
init_output_guard();
|