osagent 0.1.16 → 0.1.18
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/README.md +120 -27
- package/dist/cli.js +406 -212
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -142539,7 +142539,7 @@ var init_anthropic = __esm({
|
|
|
142539
142539
|
const lowerModel = model.toLowerCase();
|
|
142540
142540
|
return lowerModel.includes("claude");
|
|
142541
142541
|
}
|
|
142542
|
-
buildRequest(request4,
|
|
142542
|
+
buildRequest(request4, _userPromptId) {
|
|
142543
142543
|
const result = { ...request4 };
|
|
142544
142544
|
if (result.temperature !== void 0 && result.top_p !== void 0) {
|
|
142545
142545
|
delete result.top_p;
|
|
@@ -142577,7 +142577,7 @@ var init_openrouter = __esm({
|
|
|
142577
142577
|
"X-Title": "OSAgent"
|
|
142578
142578
|
};
|
|
142579
142579
|
}
|
|
142580
|
-
buildRequest(request4,
|
|
142580
|
+
buildRequest(request4, _userPromptId) {
|
|
142581
142581
|
const result = { ...request4 };
|
|
142582
142582
|
if (result.temperature !== void 0 && result.top_p !== void 0 && AnthropicOpenAICompatibleProvider.isClaudeModel(result.model)) {
|
|
142583
142583
|
delete result.top_p;
|
|
@@ -142611,14 +142611,14 @@ var init_ollama = __esm({
|
|
|
142611
142611
|
*/
|
|
142612
142612
|
static isOllamaProvider(config) {
|
|
142613
142613
|
const baseUrl = config.baseUrl?.toLowerCase() || "";
|
|
142614
|
-
return baseUrl.includes("ollama.com") || baseUrl.includes("localhost:11434") || baseUrl.includes("127.0.0.1:11434");
|
|
142614
|
+
return baseUrl.includes("osa.dev") || baseUrl.includes("ollama.com") || baseUrl.includes("localhost:11434") || baseUrl.includes("127.0.0.1:11434");
|
|
142615
142615
|
}
|
|
142616
142616
|
/**
|
|
142617
|
-
* Check if this is
|
|
142617
|
+
* Check if this is OS Agent Cloud (vs Local)
|
|
142618
142618
|
*/
|
|
142619
142619
|
isCloud() {
|
|
142620
142620
|
const baseUrl = this.contentGeneratorConfig.baseUrl?.toLowerCase() || "";
|
|
142621
|
-
return baseUrl.includes("ollama.com");
|
|
142621
|
+
return baseUrl.includes("osa.dev") || baseUrl.includes("ollama.com");
|
|
142622
142622
|
}
|
|
142623
142623
|
buildHeaders() {
|
|
142624
142624
|
const version2 = this.cliConfig.getCliVersion() || "unknown";
|
|
@@ -146088,7 +146088,7 @@ function createContentGeneratorConfig(config, authType, generationConfig) {
|
|
|
146088
146088
|
return {
|
|
146089
146089
|
...newContentGeneratorConfig,
|
|
146090
146090
|
model: newContentGeneratorConfig?.model || DEFAULT_OLLAMA_CODER_MODEL,
|
|
146091
|
-
baseUrl: newContentGeneratorConfig?.baseUrl || "https://
|
|
146091
|
+
baseUrl: newContentGeneratorConfig?.baseUrl || "https://osa.dev",
|
|
146092
146092
|
// API key from OLLAMA_API_KEY env var or settings
|
|
146093
146093
|
apiKey: newContentGeneratorConfig?.apiKey || process.env["OLLAMA_API_KEY"]
|
|
146094
146094
|
};
|
|
@@ -146108,7 +146108,7 @@ function createContentGeneratorConfig(config, authType, generationConfig) {
|
|
|
146108
146108
|
};
|
|
146109
146109
|
}
|
|
146110
146110
|
async function createContentGenerator(config, gcConfig, sessionId2, isInitialAuth) {
|
|
146111
|
-
const version2 = "0.1.
|
|
146111
|
+
const version2 = "0.1.18";
|
|
146112
146112
|
const userAgent2 = `OSAgent/${version2} (${process.platform}; ${process.arch})`;
|
|
146113
146113
|
const baseHeaders = {
|
|
146114
146114
|
"User-Agent": userAgent2
|
|
@@ -287093,8 +287093,7 @@ init_esbuild_shims();
|
|
|
287093
287093
|
|
|
287094
287094
|
// packages/cli/src/patches/punycode-shim.ts
|
|
287095
287095
|
init_esbuild_shims();
|
|
287096
|
-
import Module from "node:module";
|
|
287097
|
-
import { createRequire as createRequire2 } from "node:module";
|
|
287096
|
+
import Module, { createRequire as createRequire2 } from "node:module";
|
|
287098
287097
|
var require2 = createRequire2(import.meta.url);
|
|
287099
287098
|
var userlandPunycode = require2.resolve("punycode/");
|
|
287100
287099
|
var moduleAny = Module;
|
|
@@ -303773,8 +303772,8 @@ function saveSettings(settingsFile) {
|
|
|
303773
303772
|
__name(saveSettings, "saveSettings");
|
|
303774
303773
|
|
|
303775
303774
|
// packages/cli/src/config/auth.ts
|
|
303776
|
-
function validateAuthMethod(authMethod) {
|
|
303777
|
-
const settings = loadSettings();
|
|
303775
|
+
function validateAuthMethod(authMethod, mergedSettings) {
|
|
303776
|
+
const settings = mergedSettings ? { merged: mergedSettings } : loadSettings();
|
|
303778
303777
|
loadEnvironment(settings.merged);
|
|
303779
303778
|
if (authMethod === AuthType2.USE_OPENAI) {
|
|
303780
303779
|
const hasApiKey = process.env["OPENAI_API_KEY"] || settings.merged.security?.auth?.apiKey;
|
|
@@ -303786,6 +303785,16 @@ function validateAuthMethod(authMethod) {
|
|
|
303786
303785
|
if (authMethod === AuthType2.OSA_OAUTH) {
|
|
303787
303786
|
return null;
|
|
303788
303787
|
}
|
|
303788
|
+
if (authMethod === AuthType2.OLLAMA_CLOUD) {
|
|
303789
|
+
const hasApiKey = process.env["OLLAMA_API_KEY"] || settings.merged.security?.auth?.apiKey;
|
|
303790
|
+
if (!hasApiKey) {
|
|
303791
|
+
return "OLLAMA_API_KEY environment variable not found. Get your API key at https://osa.dev";
|
|
303792
|
+
}
|
|
303793
|
+
return null;
|
|
303794
|
+
}
|
|
303795
|
+
if (authMethod === AuthType2.OLLAMA_LOCAL) {
|
|
303796
|
+
return null;
|
|
303797
|
+
}
|
|
303789
303798
|
return "Invalid auth method selected.";
|
|
303790
303799
|
}
|
|
303791
303800
|
__name(validateAuthMethod, "validateAuthMethod");
|
|
@@ -309690,7 +309699,7 @@ __name(getPackageJson, "getPackageJson");
|
|
|
309690
309699
|
// packages/cli/src/utils/version.ts
|
|
309691
309700
|
async function getCliVersion() {
|
|
309692
309701
|
const pkgJson = await getPackageJson();
|
|
309693
|
-
return "0.1.
|
|
309702
|
+
return "0.1.18";
|
|
309694
309703
|
}
|
|
309695
309704
|
__name(getCliVersion, "getCliVersion");
|
|
309696
309705
|
|
|
@@ -313695,7 +313704,7 @@ var formatDuration = /* @__PURE__ */ __name((milliseconds) => {
|
|
|
313695
313704
|
|
|
313696
313705
|
// packages/cli/src/generated/git-commit.ts
|
|
313697
313706
|
init_esbuild_shims();
|
|
313698
|
-
var GIT_COMMIT_INFO2 = "
|
|
313707
|
+
var GIT_COMMIT_INFO2 = "c6060b4";
|
|
313699
313708
|
|
|
313700
313709
|
// packages/cli/src/utils/systemInfo.ts
|
|
313701
313710
|
async function getNpmVersion() {
|
|
@@ -313900,16 +313909,14 @@ Execute each agent with the same task and synthesize their combined results.`;
|
|
|
313900
313909
|
return t2("List all available built-in and custom agents.");
|
|
313901
313910
|
},
|
|
313902
313911
|
kind: "built-in" /* BUILT_IN */,
|
|
313903
|
-
action: /* @__PURE__ */ __name(() => {
|
|
313904
|
-
|
|
313905
|
-
|
|
313906
|
-
|
|
313907
|
-
|
|
313908
|
-
|
|
313909
|
-
|
|
313910
|
-
|
|
313911
|
-
};
|
|
313912
|
-
}, "action")
|
|
313912
|
+
action: /* @__PURE__ */ __name(() => ({
|
|
313913
|
+
type: "submit_prompt",
|
|
313914
|
+
content: [
|
|
313915
|
+
{
|
|
313916
|
+
text: `List all available subagents with their names and descriptions. Include both built-in agents (general-purpose, research-explorer, code-reviewer, test-writer, documentation, osa-orchestrator) and any custom agents defined in .osagent/agents/`
|
|
313917
|
+
}
|
|
313918
|
+
]
|
|
313919
|
+
}), "action")
|
|
313913
313920
|
}
|
|
313914
313921
|
]
|
|
313915
313922
|
};
|
|
@@ -314524,6 +314531,108 @@ var compressCommand = {
|
|
|
314524
314531
|
}, "action")
|
|
314525
314532
|
};
|
|
314526
314533
|
|
|
314534
|
+
// packages/cli/src/ui/commands/consultCommand.ts
|
|
314535
|
+
init_esbuild_shims();
|
|
314536
|
+
var consultCommand = {
|
|
314537
|
+
name: "consult",
|
|
314538
|
+
get description() {
|
|
314539
|
+
return t2("Manage consultation mode - gather context through questions");
|
|
314540
|
+
},
|
|
314541
|
+
kind: "built-in" /* BUILT_IN */,
|
|
314542
|
+
subCommands: [
|
|
314543
|
+
{
|
|
314544
|
+
name: "on",
|
|
314545
|
+
get description() {
|
|
314546
|
+
return t2("Enable active consultation mode");
|
|
314547
|
+
},
|
|
314548
|
+
kind: "built-in" /* BUILT_IN */,
|
|
314549
|
+
action: /* @__PURE__ */ __name(async () => ({
|
|
314550
|
+
type: "message",
|
|
314551
|
+
messageType: "info",
|
|
314552
|
+
content: t2("Consultation mode: ACTIVE\nThe agent will ask clarifying questions as you work.\nPress [a] to answer, [s] to skip questions.")
|
|
314553
|
+
}), "action")
|
|
314554
|
+
},
|
|
314555
|
+
{
|
|
314556
|
+
name: "off",
|
|
314557
|
+
get description() {
|
|
314558
|
+
return t2("Disable consultation mode");
|
|
314559
|
+
},
|
|
314560
|
+
kind: "built-in" /* BUILT_IN */,
|
|
314561
|
+
action: /* @__PURE__ */ __name(async () => ({
|
|
314562
|
+
type: "message",
|
|
314563
|
+
messageType: "info",
|
|
314564
|
+
content: t2("Consultation mode: OFF\nNo questions will be asked.")
|
|
314565
|
+
}), "action")
|
|
314566
|
+
},
|
|
314567
|
+
{
|
|
314568
|
+
name: "blocking",
|
|
314569
|
+
get description() {
|
|
314570
|
+
return t2("Enable blocking mode - high priority questions pause the agent");
|
|
314571
|
+
},
|
|
314572
|
+
kind: "built-in" /* BUILT_IN */,
|
|
314573
|
+
action: /* @__PURE__ */ __name(async () => ({
|
|
314574
|
+
type: "message",
|
|
314575
|
+
messageType: "info",
|
|
314576
|
+
content: t2("Consultation mode: BLOCKING\nHigh priority questions will pause the agent until answered.\nThis ensures critical decisions get your input.")
|
|
314577
|
+
}), "action")
|
|
314578
|
+
},
|
|
314579
|
+
{
|
|
314580
|
+
name: "context",
|
|
314581
|
+
get description() {
|
|
314582
|
+
return t2("Show collected context from consultation");
|
|
314583
|
+
},
|
|
314584
|
+
kind: "built-in" /* BUILT_IN */,
|
|
314585
|
+
action: /* @__PURE__ */ __name(async () => ({
|
|
314586
|
+
type: "message",
|
|
314587
|
+
messageType: "info",
|
|
314588
|
+
content: t2("Use this to view all context gathered through consultation.\n(Context will appear here when questions are answered)")
|
|
314589
|
+
}), "action")
|
|
314590
|
+
},
|
|
314591
|
+
{
|
|
314592
|
+
name: "clear",
|
|
314593
|
+
get description() {
|
|
314594
|
+
return t2("Clear all collected consultation context");
|
|
314595
|
+
},
|
|
314596
|
+
kind: "built-in" /* BUILT_IN */,
|
|
314597
|
+
action: /* @__PURE__ */ __name(async () => ({
|
|
314598
|
+
type: "message",
|
|
314599
|
+
messageType: "info",
|
|
314600
|
+
content: t2("Consultation context cleared.")
|
|
314601
|
+
}), "action")
|
|
314602
|
+
}
|
|
314603
|
+
],
|
|
314604
|
+
action: /* @__PURE__ */ __name(async (_context, args) => {
|
|
314605
|
+
const argTrimmed = args.trim().toLowerCase();
|
|
314606
|
+
if (!argTrimmed) {
|
|
314607
|
+
return {
|
|
314608
|
+
type: "message",
|
|
314609
|
+
messageType: "info",
|
|
314610
|
+
content: t2(`Consultation Mode
|
|
314611
|
+
|
|
314612
|
+
The consultation system gathers context from you as you work:
|
|
314613
|
+
- Questions appear below the loading indicator
|
|
314614
|
+
- Press [a] to answer, [s] to skip
|
|
314615
|
+
- Context is used to improve agent responses
|
|
314616
|
+
|
|
314617
|
+
Commands:
|
|
314618
|
+
/consult on - Active mode (questions shown, agent continues)
|
|
314619
|
+
/consult blocking - Blocking mode (high-priority questions pause agent)
|
|
314620
|
+
/consult off - Disable consultation
|
|
314621
|
+
/consult context - View collected context
|
|
314622
|
+
/consult clear - Clear all context
|
|
314623
|
+
|
|
314624
|
+
Current: Active mode`)
|
|
314625
|
+
};
|
|
314626
|
+
}
|
|
314627
|
+
return {
|
|
314628
|
+
type: "message",
|
|
314629
|
+
messageType: "error",
|
|
314630
|
+
content: t2(`Unknown option: ${argTrimmed}
|
|
314631
|
+
Use /consult for help.`)
|
|
314632
|
+
};
|
|
314633
|
+
}, "action")
|
|
314634
|
+
};
|
|
314635
|
+
|
|
314527
314636
|
// packages/cli/src/ui/commands/continueCommand.ts
|
|
314528
314637
|
init_esbuild_shims();
|
|
314529
314638
|
import * as fs72 from "node:fs/promises";
|
|
@@ -315293,7 +315402,7 @@ var doctorCommand = {
|
|
|
315293
315402
|
content: t2(`\u2713 Updated to osagent@${newVersion}
|
|
315294
315403
|
Restart osagent to use the new version.`)
|
|
315295
315404
|
};
|
|
315296
|
-
} catch (
|
|
315405
|
+
} catch (_error) {
|
|
315297
315406
|
return {
|
|
315298
315407
|
type: "message",
|
|
315299
315408
|
messageType: "error",
|
|
@@ -319081,6 +319190,7 @@ var BuiltinCommandLoader = class {
|
|
|
319081
319190
|
chatCommand,
|
|
319082
319191
|
clearCommand,
|
|
319083
319192
|
compressCommand,
|
|
319193
|
+
consultCommand,
|
|
319084
319194
|
continueCommand,
|
|
319085
319195
|
openaiProfileCommand,
|
|
319086
319196
|
copyCommand,
|
|
@@ -344764,9 +344874,7 @@ var TodoProvider = /* @__PURE__ */ __name(({
|
|
|
344764
344874
|
const clearTodos = (0, import_react63.useCallback)(() => {
|
|
344765
344875
|
setTodosState([]);
|
|
344766
344876
|
}, []);
|
|
344767
|
-
const getActiveTodo = (0, import_react63.useCallback)(() =>
|
|
344768
|
-
return todos.find((todo) => todo.status === "in_progress");
|
|
344769
|
-
}, [todos]);
|
|
344877
|
+
const getActiveTodo = (0, import_react63.useCallback)(() => todos.find((todo) => todo.status === "in_progress"), [todos]);
|
|
344770
344878
|
const value = (0, import_react63.useMemo)(
|
|
344771
344879
|
() => ({
|
|
344772
344880
|
todos,
|
|
@@ -349171,7 +349279,7 @@ function AuthDialog() {
|
|
|
349171
349279
|
"Note: Your existing API key in settings.json will not be cleared when using Ollama Cloud. You can switch to a different authentication method later if needed."
|
|
349172
349280
|
) }) }),
|
|
349173
349281
|
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(Text3, { children: t2("OSAgent - AI Coding Assistant") }) }),
|
|
349174
|
-
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(Text3, { color: Colors.AccentBlue, children: "https://
|
|
349282
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(Text3, { color: Colors.AccentBlue, children: "https://osa.dev" }) })
|
|
349175
349283
|
]
|
|
349176
349284
|
}
|
|
349177
349285
|
);
|
|
@@ -350284,7 +350392,7 @@ var DialogManager = /* @__PURE__ */ __name(({
|
|
|
350284
350392
|
onSubmit: (apiKey, baseUrl, model) => {
|
|
350285
350393
|
uiActions.handleAuthSelect(AuthType2.OLLAMA_CLOUD, "User" /* User */, {
|
|
350286
350394
|
apiKey,
|
|
350287
|
-
baseUrl: baseUrl || "https://
|
|
350395
|
+
baseUrl: baseUrl || "https://osa.dev",
|
|
350288
350396
|
model: model || "qwen3-coder:480b-cloud"
|
|
350289
350397
|
});
|
|
350290
350398
|
},
|
|
@@ -350293,10 +350401,10 @@ var DialogManager = /* @__PURE__ */ __name(({
|
|
|
350293
350401
|
uiActions.setAuthState("updating" /* Updating */);
|
|
350294
350402
|
},
|
|
350295
350403
|
defaultApiKey: fromSettings?.apiKey || process34.env["OLLAMA_API_KEY"] || "",
|
|
350296
|
-
defaultBaseUrl: fromSettings?.baseUrl || "https://
|
|
350404
|
+
defaultBaseUrl: fromSettings?.baseUrl || "https://osa.dev",
|
|
350297
350405
|
defaultModel: modelSettings?.name || "qwen3-coder:480b-cloud",
|
|
350298
350406
|
providerName: "Ollama Cloud",
|
|
350299
|
-
apiKeyUrl: "https://
|
|
350407
|
+
apiKeyUrl: "https://osa.dev/settings/keys"
|
|
350300
350408
|
}
|
|
350301
350409
|
);
|
|
350302
350410
|
}
|
|
@@ -350444,9 +350552,74 @@ var LoadingIndicator = /* @__PURE__ */ __name(({
|
|
|
350444
350552
|
] });
|
|
350445
350553
|
}, "LoadingIndicator");
|
|
350446
350554
|
|
|
350447
|
-
// packages/cli/src/ui/components/
|
|
350555
|
+
// packages/cli/src/ui/components/ConsultationDisplay.tsx
|
|
350448
350556
|
init_esbuild_shims();
|
|
350449
350557
|
var import_jsx_runtime88 = __toESM(require_jsx_runtime(), 1);
|
|
350558
|
+
var ConsultationDisplay = /* @__PURE__ */ __name(({
|
|
350559
|
+
isStreamingActive = false,
|
|
350560
|
+
currentQuestion = null,
|
|
350561
|
+
queueCount = 0,
|
|
350562
|
+
isBlocking = false,
|
|
350563
|
+
consultationMode = "active"
|
|
350564
|
+
}) => {
|
|
350565
|
+
if (!currentQuestion) {
|
|
350566
|
+
return null;
|
|
350567
|
+
}
|
|
350568
|
+
const priorityColors = {
|
|
350569
|
+
high: theme.status.error,
|
|
350570
|
+
medium: theme.status.warning,
|
|
350571
|
+
low: theme.text.secondary
|
|
350572
|
+
};
|
|
350573
|
+
const categoryIcons = {
|
|
350574
|
+
architecture: "[arch]",
|
|
350575
|
+
requirements: "[req]",
|
|
350576
|
+
clarification: "[?]",
|
|
350577
|
+
preference: "[pref]"
|
|
350578
|
+
};
|
|
350579
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, paddingX: 1, children: [
|
|
350580
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(Box_default, { marginBottom: 0, children: [
|
|
350581
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)(Text3, { color: theme.text.accent, bold: true, children: isBlocking ? "! " : "? " }),
|
|
350582
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(Text3, { color: theme.text.secondary, children: [
|
|
350583
|
+
t2("Consultation"),
|
|
350584
|
+
queueCount > 0 && ` (+${queueCount} more)`
|
|
350585
|
+
] }),
|
|
350586
|
+
isBlocking && /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(Text3, { color: theme.status.warning, children: [
|
|
350587
|
+
" ",
|
|
350588
|
+
t2("[Waiting for answer]")
|
|
350589
|
+
] })
|
|
350590
|
+
] }),
|
|
350591
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(
|
|
350592
|
+
Box_default,
|
|
350593
|
+
{
|
|
350594
|
+
flexDirection: "column",
|
|
350595
|
+
borderStyle: "single",
|
|
350596
|
+
borderColor: isBlocking ? theme.status.warning : theme.border.default,
|
|
350597
|
+
paddingX: 1,
|
|
350598
|
+
marginTop: 0,
|
|
350599
|
+
children: [
|
|
350600
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(Box_default, { children: [
|
|
350601
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)(Text3, { color: priorityColors[currentQuestion.priority], children: categoryIcons[currentQuestion.category] }),
|
|
350602
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)(Text3, { color: theme.text.secondary, children: " " }),
|
|
350603
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)(Text3, { color: theme.text.primary, wrap: "wrap", children: currentQuestion.question })
|
|
350604
|
+
] }),
|
|
350605
|
+
currentQuestion.context && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(Box_default, { marginTop: 0, children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(Text3, { color: theme.text.secondary, dimColor: true, wrap: "wrap", children: currentQuestion.context }) }),
|
|
350606
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(Text3, { color: theme.text.secondary, children: [
|
|
350607
|
+
t2("Reply with your answer in the input below"),
|
|
350608
|
+
isStreamingActive && t2(" (agent continues in background)")
|
|
350609
|
+
] }) })
|
|
350610
|
+
]
|
|
350611
|
+
}
|
|
350612
|
+
),
|
|
350613
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)(Box_default, { marginTop: 0, children: /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(Text3, { color: theme.text.secondary, dimColor: true, children: [
|
|
350614
|
+
t2("Mode: {{mode}}", { mode: consultationMode }),
|
|
350615
|
+
consultationMode === "blocking" && currentQuestion.priority === "high" ? t2(" - High priority questions block agent") : ""
|
|
350616
|
+
] }) })
|
|
350617
|
+
] });
|
|
350618
|
+
}, "ConsultationDisplay");
|
|
350619
|
+
|
|
350620
|
+
// packages/cli/src/ui/components/ContextSummaryDisplay.tsx
|
|
350621
|
+
init_esbuild_shims();
|
|
350622
|
+
var import_jsx_runtime89 = __toESM(require_jsx_runtime(), 1);
|
|
350450
350623
|
var ContextSummaryDisplay = /* @__PURE__ */ __name(({
|
|
350451
350624
|
OSAMdFileCount,
|
|
350452
350625
|
contextFileNames,
|
|
@@ -350461,7 +350634,7 @@ var ContextSummaryDisplay = /* @__PURE__ */ __name(({
|
|
|
350461
350634
|
const blockedMcpServerCount = blockedMcpServers?.length || 0;
|
|
350462
350635
|
const openFileCount = ideContext?.workspaceState?.openFiles?.length ?? 0;
|
|
350463
350636
|
if (OSAMdFileCount === 0 && mcpServerCount === 0 && blockedMcpServerCount === 0 && openFileCount === 0) {
|
|
350464
|
-
return /* @__PURE__ */ (0,
|
|
350637
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(Text3, { children: " " });
|
|
350465
350638
|
}
|
|
350466
350639
|
const openFilesText = (() => {
|
|
350467
350640
|
if (openFileCount === 0) {
|
|
@@ -350519,16 +350692,16 @@ var ContextSummaryDisplay = /* @__PURE__ */ __name(({
|
|
|
350519
350692
|
})();
|
|
350520
350693
|
const summaryParts = [openFilesText, OSAMdText, mcpText].filter(Boolean);
|
|
350521
350694
|
if (isNarrow) {
|
|
350522
|
-
return /* @__PURE__ */ (0,
|
|
350523
|
-
/* @__PURE__ */ (0,
|
|
350524
|
-
summaryParts.map((part, index) => /* @__PURE__ */ (0,
|
|
350695
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
350696
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)(Text3, { color: theme.text.secondary, children: t2("Using:") }),
|
|
350697
|
+
summaryParts.map((part, index) => /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(Text3, { color: theme.text.secondary, children: [
|
|
350525
350698
|
" ",
|
|
350526
350699
|
"- ",
|
|
350527
350700
|
part
|
|
350528
350701
|
] }, index))
|
|
350529
350702
|
] });
|
|
350530
350703
|
}
|
|
350531
|
-
return /* @__PURE__ */ (0,
|
|
350704
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(Text3, { color: theme.text.secondary, children: [
|
|
350532
350705
|
t2("Using:"),
|
|
350533
350706
|
" ",
|
|
350534
350707
|
summaryParts.join(" | ")
|
|
@@ -350537,7 +350710,7 @@ var ContextSummaryDisplay = /* @__PURE__ */ __name(({
|
|
|
350537
350710
|
|
|
350538
350711
|
// packages/cli/src/ui/components/AutoAcceptIndicator.tsx
|
|
350539
350712
|
init_esbuild_shims();
|
|
350540
|
-
var
|
|
350713
|
+
var import_jsx_runtime90 = __toESM(require_jsx_runtime(), 1);
|
|
350541
350714
|
var AutoAcceptIndicator = /* @__PURE__ */ __name(({
|
|
350542
350715
|
approvalMode
|
|
350543
350716
|
}) => {
|
|
@@ -350564,29 +350737,29 @@ var AutoAcceptIndicator = /* @__PURE__ */ __name(({
|
|
|
350564
350737
|
default:
|
|
350565
350738
|
break;
|
|
350566
350739
|
}
|
|
350567
|
-
return /* @__PURE__ */ (0,
|
|
350740
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(Text3, { color: textColor, children: [
|
|
350568
350741
|
textContent2,
|
|
350569
|
-
subText && /* @__PURE__ */ (0,
|
|
350742
|
+
subText && /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(Text3, { color: theme.text.secondary, children: subText })
|
|
350570
350743
|
] }) });
|
|
350571
350744
|
}, "AutoAcceptIndicator");
|
|
350572
350745
|
|
|
350573
350746
|
// packages/cli/src/ui/components/ShellModeIndicator.tsx
|
|
350574
350747
|
init_esbuild_shims();
|
|
350575
|
-
var
|
|
350576
|
-
var ShellModeIndicator = /* @__PURE__ */ __name(() => /* @__PURE__ */ (0,
|
|
350748
|
+
var import_jsx_runtime91 = __toESM(require_jsx_runtime(), 1);
|
|
350749
|
+
var ShellModeIndicator = /* @__PURE__ */ __name(() => /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(Text3, { color: theme.ui.symbol, children: [
|
|
350577
350750
|
"shell mode enabled",
|
|
350578
|
-
/* @__PURE__ */ (0,
|
|
350751
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Text3, { color: theme.text.secondary, children: " (esc to disable)" })
|
|
350579
350752
|
] }) }), "ShellModeIndicator");
|
|
350580
350753
|
|
|
350581
350754
|
// packages/cli/src/ui/components/DetailedMessagesDisplay.tsx
|
|
350582
350755
|
init_esbuild_shims();
|
|
350583
|
-
var
|
|
350756
|
+
var import_jsx_runtime92 = __toESM(require_jsx_runtime(), 1);
|
|
350584
350757
|
var DetailedMessagesDisplay = /* @__PURE__ */ __name(({ messages, maxHeight, width }) => {
|
|
350585
350758
|
if (messages.length === 0) {
|
|
350586
350759
|
return null;
|
|
350587
350760
|
}
|
|
350588
350761
|
const borderAndPadding = 4;
|
|
350589
|
-
return /* @__PURE__ */ (0,
|
|
350762
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(
|
|
350590
350763
|
Box_default,
|
|
350591
350764
|
{
|
|
350592
350765
|
flexDirection: "column",
|
|
@@ -350596,12 +350769,12 @@ var DetailedMessagesDisplay = /* @__PURE__ */ __name(({ messages, maxHeight, wid
|
|
|
350596
350769
|
paddingX: 1,
|
|
350597
350770
|
width,
|
|
350598
350771
|
children: [
|
|
350599
|
-
/* @__PURE__ */ (0,
|
|
350772
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Box_default, { marginBottom: 1, children: /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(Text3, { bold: true, color: theme.text.primary, children: [
|
|
350600
350773
|
"Debug Console",
|
|
350601
350774
|
" ",
|
|
350602
|
-
/* @__PURE__ */ (0,
|
|
350775
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Text3, { color: theme.text.secondary, children: "(ctrl+o to close)" })
|
|
350603
350776
|
] }) }),
|
|
350604
|
-
/* @__PURE__ */ (0,
|
|
350777
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(MaxSizedBox, { maxHeight, maxWidth: width - borderAndPadding, children: messages.map((msg, index) => {
|
|
350605
350778
|
let textColor = theme.text.primary;
|
|
350606
350779
|
let icon = "\u2139";
|
|
350607
350780
|
switch (msg.type) {
|
|
@@ -350621,14 +350794,14 @@ var DetailedMessagesDisplay = /* @__PURE__ */ __name(({ messages, maxHeight, wid
|
|
|
350621
350794
|
default:
|
|
350622
350795
|
break;
|
|
350623
350796
|
}
|
|
350624
|
-
return /* @__PURE__ */ (0,
|
|
350625
|
-
/* @__PURE__ */ (0,
|
|
350797
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(Box_default, { flexDirection: "row", children: [
|
|
350798
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(Text3, { color: textColor, children: [
|
|
350626
350799
|
icon,
|
|
350627
350800
|
" "
|
|
350628
350801
|
] }),
|
|
350629
|
-
/* @__PURE__ */ (0,
|
|
350802
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(Text3, { color: textColor, wrap: "wrap", children: [
|
|
350630
350803
|
msg.content,
|
|
350631
|
-
msg.count && msg.count > 1 && /* @__PURE__ */ (0,
|
|
350804
|
+
msg.count && msg.count > 1 && /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(Text3, { color: theme.text.secondary, children: [
|
|
350632
350805
|
" (x",
|
|
350633
350806
|
msg.count,
|
|
350634
350807
|
")"
|
|
@@ -350651,7 +350824,7 @@ init_esbuild_shims();
|
|
|
350651
350824
|
// packages/cli/src/ui/components/PrepareLabel.tsx
|
|
350652
350825
|
init_esbuild_shims();
|
|
350653
350826
|
var import_react87 = __toESM(require_react(), 1);
|
|
350654
|
-
var
|
|
350827
|
+
var import_jsx_runtime93 = __toESM(require_jsx_runtime(), 1);
|
|
350655
350828
|
var MAX_WIDTH = 150;
|
|
350656
350829
|
var _PrepareLabel = /* @__PURE__ */ __name(({
|
|
350657
350830
|
label,
|
|
@@ -350663,7 +350836,7 @@ var _PrepareLabel = /* @__PURE__ */ __name(({
|
|
|
350663
350836
|
const hasMatch = matchedIndex !== void 0 && matchedIndex >= 0 && matchedIndex < label.length && userInput.length > 0;
|
|
350664
350837
|
if (!hasMatch) {
|
|
350665
350838
|
const display = isExpanded ? label : label.length > MAX_WIDTH ? label.slice(0, MAX_WIDTH) + "..." : label;
|
|
350666
|
-
return /* @__PURE__ */ (0,
|
|
350839
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Text3, { wrap: "wrap", color: textColor, children: display });
|
|
350667
350840
|
}
|
|
350668
350841
|
const matchLength = userInput.length;
|
|
350669
350842
|
let before = "";
|
|
@@ -350702,9 +350875,9 @@ var _PrepareLabel = /* @__PURE__ */ __name(({
|
|
|
350702
350875
|
after = after.length >= 3 ? after.slice(0, -3) + "..." : "...";
|
|
350703
350876
|
}
|
|
350704
350877
|
}
|
|
350705
|
-
return /* @__PURE__ */ (0,
|
|
350878
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(Text3, { color: textColor, wrap: "wrap", children: [
|
|
350706
350879
|
before,
|
|
350707
|
-
match2 ? match2.split(/(\s+)/).map((part, index) => /* @__PURE__ */ (0,
|
|
350880
|
+
match2 ? match2.split(/(\s+)/).map((part, index) => /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
350708
350881
|
Text3,
|
|
350709
350882
|
{
|
|
350710
350883
|
color: theme.background.primary,
|
|
@@ -350719,7 +350892,7 @@ var _PrepareLabel = /* @__PURE__ */ __name(({
|
|
|
350719
350892
|
var PrepareLabel = import_react87.default.memo(_PrepareLabel);
|
|
350720
350893
|
|
|
350721
350894
|
// packages/cli/src/ui/components/SuggestionsDisplay.tsx
|
|
350722
|
-
var
|
|
350895
|
+
var import_jsx_runtime94 = __toESM(require_jsx_runtime(), 1);
|
|
350723
350896
|
var MAX_SUGGESTIONS_TO_SHOW = 8;
|
|
350724
350897
|
function SuggestionsDisplay({
|
|
350725
350898
|
suggestions,
|
|
@@ -350732,7 +350905,7 @@ function SuggestionsDisplay({
|
|
|
350732
350905
|
expandedIndex
|
|
350733
350906
|
}) {
|
|
350734
350907
|
if (isLoading) {
|
|
350735
|
-
return /* @__PURE__ */ (0,
|
|
350908
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Box_default, { paddingX: 1, width, children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Text3, { color: "gray", children: "Loading suggestions..." }) });
|
|
350736
350909
|
}
|
|
350737
350910
|
if (suggestions.length === 0) {
|
|
350738
350911
|
return null;
|
|
@@ -350748,15 +350921,15 @@ function SuggestionsDisplay({
|
|
|
350748
350921
|
...suggestions.map((s2) => getFullLabel(s2).length)
|
|
350749
350922
|
);
|
|
350750
350923
|
const commandColumnWidth = mode === "slash" ? Math.min(maxLabelLength, Math.floor(width * 0.5)) : 0;
|
|
350751
|
-
return /* @__PURE__ */ (0,
|
|
350752
|
-
scrollOffset > 0 && /* @__PURE__ */ (0,
|
|
350924
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(Box_default, { flexDirection: "column", paddingX: 1, width, children: [
|
|
350925
|
+
scrollOffset > 0 && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Text3, { color: theme.text.primary, children: "\u25B2" }),
|
|
350753
350926
|
visibleSuggestions.map((suggestion, index) => {
|
|
350754
350927
|
const originalIndex = startIndex + index;
|
|
350755
350928
|
const isActive = originalIndex === activeIndex;
|
|
350756
350929
|
const isExpanded = originalIndex === expandedIndex;
|
|
350757
350930
|
const textColor = isActive ? theme.text.accent : theme.text.secondary;
|
|
350758
350931
|
const isLong = suggestion.value.length >= MAX_WIDTH;
|
|
350759
|
-
const labelElement = /* @__PURE__ */ (0,
|
|
350932
|
+
const labelElement = /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
350760
350933
|
PrepareLabel,
|
|
350761
350934
|
{
|
|
350762
350935
|
label: suggestion.value,
|
|
@@ -350766,23 +350939,23 @@ function SuggestionsDisplay({
|
|
|
350766
350939
|
isExpanded
|
|
350767
350940
|
}
|
|
350768
350941
|
);
|
|
350769
|
-
return /* @__PURE__ */ (0,
|
|
350770
|
-
/* @__PURE__ */ (0,
|
|
350942
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(Box_default, { flexDirection: "row", children: [
|
|
350943
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
350771
350944
|
Box_default,
|
|
350772
350945
|
{
|
|
350773
350946
|
...mode === "slash" ? { width: commandColumnWidth, flexShrink: 0 } : { flexShrink: 1 },
|
|
350774
|
-
children: /* @__PURE__ */ (0,
|
|
350947
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(Box_default, { children: [
|
|
350775
350948
|
labelElement,
|
|
350776
|
-
suggestion.commandKind === "mcp-prompt" /* MCP_PROMPT */ && /* @__PURE__ */ (0,
|
|
350949
|
+
suggestion.commandKind === "mcp-prompt" /* MCP_PROMPT */ && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Text3, { color: textColor, children: " [MCP]" })
|
|
350777
350950
|
] })
|
|
350778
350951
|
}
|
|
350779
350952
|
),
|
|
350780
|
-
suggestion.description && /* @__PURE__ */ (0,
|
|
350781
|
-
isActive && isLong && /* @__PURE__ */ (0,
|
|
350953
|
+
suggestion.description && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Box_default, { flexGrow: 1, paddingLeft: 3, children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Text3, { color: textColor, wrap: "truncate", children: suggestion.description }) }),
|
|
350954
|
+
isActive && isLong && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Text3, { color: Colors.Gray, children: isExpanded ? " \u2190 " : " \u2192 " }) })
|
|
350782
350955
|
] }, `${suggestion.value}-${originalIndex}`);
|
|
350783
350956
|
}),
|
|
350784
|
-
endIndex < suggestions.length && /* @__PURE__ */ (0,
|
|
350785
|
-
suggestions.length > MAX_SUGGESTIONS_TO_SHOW && /* @__PURE__ */ (0,
|
|
350957
|
+
endIndex < suggestions.length && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Text3, { color: "gray", children: "\u25BC" }),
|
|
350958
|
+
suggestions.length > MAX_SUGGESTIONS_TO_SHOW && /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(Text3, { color: "gray", children: [
|
|
350786
350959
|
"(",
|
|
350787
350960
|
activeIndex + 1,
|
|
350788
350961
|
"/",
|
|
@@ -352037,7 +352210,7 @@ var ShellFocusContext = (0, import_react95.createContext)(true);
|
|
|
352037
352210
|
var useShellFocusState = /* @__PURE__ */ __name(() => (0, import_react95.useContext)(ShellFocusContext), "useShellFocusState");
|
|
352038
352211
|
|
|
352039
352212
|
// packages/cli/src/ui/components/InputPrompt.tsx
|
|
352040
|
-
var
|
|
352213
|
+
var import_jsx_runtime95 = __toESM(require_jsx_runtime(), 1);
|
|
352041
352214
|
var calculatePromptWidths = /* @__PURE__ */ __name((terminalWidth) => {
|
|
352042
352215
|
const widthFraction = 0.9;
|
|
352043
352216
|
const FRAME_PADDING_AND_BORDER = 4;
|
|
@@ -352546,21 +352719,21 @@ var InputPrompt = /* @__PURE__ */ __name(({
|
|
|
352546
352719
|
statusColor = theme.status.warning;
|
|
352547
352720
|
statusText = t2("Accepting edits");
|
|
352548
352721
|
}
|
|
352549
|
-
return /* @__PURE__ */ (0,
|
|
352550
|
-
/* @__PURE__ */ (0,
|
|
352722
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(import_jsx_runtime95.Fragment, { children: [
|
|
352723
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(
|
|
352551
352724
|
Box_default,
|
|
352552
352725
|
{
|
|
352553
352726
|
borderStyle: "round",
|
|
352554
352727
|
borderColor: isShellFocused && !isEmbeddedShellFocused ? statusColor ?? theme.border.focused : theme.border.default,
|
|
352555
352728
|
paddingX: 1,
|
|
352556
352729
|
children: [
|
|
352557
|
-
/* @__PURE__ */ (0,
|
|
352730
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(
|
|
352558
352731
|
Text3,
|
|
352559
352732
|
{
|
|
352560
352733
|
color: statusColor ?? theme.text.accent,
|
|
352561
352734
|
"aria-label": statusText || void 0,
|
|
352562
352735
|
children: [
|
|
352563
|
-
shellModeActive ? reverseSearchActive ? /* @__PURE__ */ (0,
|
|
352736
|
+
shellModeActive ? reverseSearchActive ? /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(
|
|
352564
352737
|
Text3,
|
|
352565
352738
|
{
|
|
352566
352739
|
color: theme.text.link,
|
|
@@ -352570,15 +352743,15 @@ var InputPrompt = /* @__PURE__ */ __name(({
|
|
|
352570
352743
|
" "
|
|
352571
352744
|
]
|
|
352572
352745
|
}
|
|
352573
|
-
) : "!" : commandSearchActive ? /* @__PURE__ */ (0,
|
|
352746
|
+
) : "!" : commandSearchActive ? /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(Text3, { color: theme.text.accent, children: "(r:) " }) : showYoloStyling ? "*" : ">",
|
|
352574
352747
|
" "
|
|
352575
352748
|
]
|
|
352576
352749
|
}
|
|
352577
352750
|
),
|
|
352578
|
-
/* @__PURE__ */ (0,
|
|
352751
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(Box_default, { flexGrow: 1, flexDirection: "column", children: buffer.text.length === 0 && placeholder ? showCursor ? /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(Text3, { children: [
|
|
352579
352752
|
source_default2.inverse(placeholder.slice(0, 1)),
|
|
352580
|
-
/* @__PURE__ */ (0,
|
|
352581
|
-
] }) : /* @__PURE__ */ (0,
|
|
352753
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(Text3, { color: theme.text.secondary, children: placeholder.slice(1) })
|
|
352754
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(Text3, { color: theme.text.secondary, children: placeholder }) : linesToRender.map((lineText, visualIdxInRenderedSet) => {
|
|
352582
352755
|
const absoluteVisualIdx = scrollVisualRow + visualIdxInRenderedSet;
|
|
352583
352756
|
const mapEntry = buffer.visualToLogicalMap[absoluteVisualIdx];
|
|
352584
352757
|
const cursorVisualRow = cursorVisualRowAbsolute - scrollVisualRow;
|
|
@@ -352625,20 +352798,20 @@ var InputPrompt = /* @__PURE__ */ __name(({
|
|
|
352625
352798
|
}
|
|
352626
352799
|
const color = seg.type === "command" || seg.type === "file" ? theme.text.accent : theme.text.primary;
|
|
352627
352800
|
renderedLine.push(
|
|
352628
|
-
/* @__PURE__ */ (0,
|
|
352801
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(Text3, { color, children: display }, `token-${segIdx}`)
|
|
352629
352802
|
);
|
|
352630
352803
|
});
|
|
352631
352804
|
if (isOnCursorLine && cursorVisualColAbsolute === cpLen(lineText)) {
|
|
352632
352805
|
renderedLine.push(
|
|
352633
|
-
/* @__PURE__ */ (0,
|
|
352806
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(Text3, { children: showCursor ? source_default2.inverse(" ") : " " }, `cursor-end-${cursorVisualColAbsolute}`)
|
|
352634
352807
|
);
|
|
352635
352808
|
}
|
|
352636
|
-
return /* @__PURE__ */ (0,
|
|
352809
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(Box_default, { height: 1, children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(Text3, { children: renderedLine }) }, `line-${visualIdxInRenderedSet}`);
|
|
352637
352810
|
}) })
|
|
352638
352811
|
]
|
|
352639
352812
|
}
|
|
352640
352813
|
),
|
|
352641
|
-
shouldShowSuggestions && /* @__PURE__ */ (0,
|
|
352814
|
+
shouldShowSuggestions && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(Box_default, { paddingRight: 2, children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
352642
352815
|
SuggestionsDisplay,
|
|
352643
352816
|
{
|
|
352644
352817
|
suggestions: activeCompletion.suggestions,
|
|
@@ -352659,7 +352832,7 @@ init_esbuild_shims();
|
|
|
352659
352832
|
|
|
352660
352833
|
// packages/cli/src/ui/components/ConsoleSummaryDisplay.tsx
|
|
352661
352834
|
init_esbuild_shims();
|
|
352662
|
-
var
|
|
352835
|
+
var import_jsx_runtime96 = __toESM(require_jsx_runtime(), 1);
|
|
352663
352836
|
var ConsoleSummaryDisplay = /* @__PURE__ */ __name(({
|
|
352664
352837
|
errorCount
|
|
352665
352838
|
}) => {
|
|
@@ -352667,14 +352840,14 @@ var ConsoleSummaryDisplay = /* @__PURE__ */ __name(({
|
|
|
352667
352840
|
return null;
|
|
352668
352841
|
}
|
|
352669
352842
|
const errorIcon = "\u2716";
|
|
352670
|
-
return /* @__PURE__ */ (0,
|
|
352843
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(Box_default, { children: errorCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(Text3, { color: theme.status.error, children: [
|
|
352671
352844
|
errorIcon,
|
|
352672
352845
|
" ",
|
|
352673
352846
|
errorCount,
|
|
352674
352847
|
" error",
|
|
352675
352848
|
errorCount > 1 ? "s" : "",
|
|
352676
352849
|
" ",
|
|
352677
|
-
/* @__PURE__ */ (0,
|
|
352850
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)(Text3, { color: theme.text.secondary, children: "(ctrl+o for details)" })
|
|
352678
352851
|
] }) });
|
|
352679
352852
|
}, "ConsoleSummaryDisplay");
|
|
352680
352853
|
|
|
@@ -352685,7 +352858,7 @@ import process36 from "node:process";
|
|
|
352685
352858
|
init_esbuild_shims();
|
|
352686
352859
|
var import_react97 = __toESM(require_react(), 1);
|
|
352687
352860
|
import process35 from "node:process";
|
|
352688
|
-
var
|
|
352861
|
+
var import_jsx_runtime97 = __toESM(require_jsx_runtime(), 1);
|
|
352689
352862
|
var MemoryUsageDisplay = /* @__PURE__ */ __name(() => {
|
|
352690
352863
|
const [memoryUsage, setMemoryUsage] = (0, import_react97.useState)("");
|
|
352691
352864
|
const [memoryUsageColor, setMemoryUsageColor] = (0, import_react97.useState)(
|
|
@@ -352703,15 +352876,15 @@ var MemoryUsageDisplay = /* @__PURE__ */ __name(() => {
|
|
|
352703
352876
|
updateMemory();
|
|
352704
352877
|
return () => clearInterval(intervalId);
|
|
352705
352878
|
}, []);
|
|
352706
|
-
return /* @__PURE__ */ (0,
|
|
352707
|
-
/* @__PURE__ */ (0,
|
|
352708
|
-
/* @__PURE__ */ (0,
|
|
352879
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(Box_default, { children: [
|
|
352880
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(Text3, { color: theme.text.secondary, children: " | " }),
|
|
352881
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(Text3, { color: memoryUsageColor, children: memoryUsage })
|
|
352709
352882
|
] });
|
|
352710
352883
|
}, "MemoryUsageDisplay");
|
|
352711
352884
|
|
|
352712
352885
|
// packages/cli/src/ui/components/ContextUsageDisplay.tsx
|
|
352713
352886
|
init_esbuild_shims();
|
|
352714
|
-
var
|
|
352887
|
+
var import_jsx_runtime98 = __toESM(require_jsx_runtime(), 1);
|
|
352715
352888
|
var formatTokens = /* @__PURE__ */ __name((count) => {
|
|
352716
352889
|
if (count >= 1e6) {
|
|
352717
352890
|
return `${(count / 1e6).toFixed(1)}M`;
|
|
@@ -352741,19 +352914,19 @@ var ContextUsageDisplay = /* @__PURE__ */ __name(({
|
|
|
352741
352914
|
const percentageUsed = (percentage * 100).toFixed(0);
|
|
352742
352915
|
const usageColor = getUsageColor(percentage);
|
|
352743
352916
|
if (terminalWidth < 80) {
|
|
352744
|
-
return /* @__PURE__ */ (0,
|
|
352917
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(Text3, { color: usageColor, children: [
|
|
352745
352918
|
"(",
|
|
352746
352919
|
percentageUsed,
|
|
352747
352920
|
"%)"
|
|
352748
352921
|
] });
|
|
352749
352922
|
}
|
|
352750
352923
|
if (terminalWidth < 120) {
|
|
352751
|
-
return /* @__PURE__ */ (0,
|
|
352752
|
-
/* @__PURE__ */ (0,
|
|
352924
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(Text3, { children: [
|
|
352925
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(Text3, { color: usageColor, children: [
|
|
352753
352926
|
percentageUsed,
|
|
352754
352927
|
"%"
|
|
352755
352928
|
] }),
|
|
352756
|
-
/* @__PURE__ */ (0,
|
|
352929
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(Text3, { color: theme.text.secondary, children: [
|
|
352757
352930
|
" ",
|
|
352758
352931
|
"(",
|
|
352759
352932
|
formatTokens(promptTokenCount),
|
|
@@ -352765,13 +352938,13 @@ var ContextUsageDisplay = /* @__PURE__ */ __name(({
|
|
|
352765
352938
|
}
|
|
352766
352939
|
const barWidth = 10;
|
|
352767
352940
|
const progressBar = generateProgressBar(percentage, barWidth);
|
|
352768
|
-
return /* @__PURE__ */ (0,
|
|
352769
|
-
/* @__PURE__ */ (0,
|
|
352941
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(Text3, { children: [
|
|
352942
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(Text3, { color: usageColor, children: [
|
|
352770
352943
|
"[",
|
|
352771
352944
|
progressBar,
|
|
352772
352945
|
"]"
|
|
352773
352946
|
] }),
|
|
352774
|
-
/* @__PURE__ */ (0,
|
|
352947
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(Text3, { color: theme.text.secondary, children: [
|
|
352775
352948
|
" ",
|
|
352776
352949
|
formatTokens(promptTokenCount),
|
|
352777
352950
|
"/",
|
|
@@ -352783,7 +352956,7 @@ var ContextUsageDisplay = /* @__PURE__ */ __name(({
|
|
|
352783
352956
|
// packages/cli/src/ui/components/DebugProfiler.tsx
|
|
352784
352957
|
init_esbuild_shims();
|
|
352785
352958
|
var import_react98 = __toESM(require_react(), 1);
|
|
352786
|
-
var
|
|
352959
|
+
var import_jsx_runtime99 = __toESM(require_jsx_runtime(), 1);
|
|
352787
352960
|
var DebugProfiler = /* @__PURE__ */ __name(() => {
|
|
352788
352961
|
const numRenders = (0, import_react98.useRef)(0);
|
|
352789
352962
|
const [showNumRenders, setShowNumRenders] = (0, import_react98.useState)(false);
|
|
@@ -352801,7 +352974,7 @@ var DebugProfiler = /* @__PURE__ */ __name(() => {
|
|
|
352801
352974
|
if (!showNumRenders) {
|
|
352802
352975
|
return null;
|
|
352803
352976
|
}
|
|
352804
|
-
return /* @__PURE__ */ (0,
|
|
352977
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(Text3, { color: theme.status.warning, children: [
|
|
352805
352978
|
"Renders: ",
|
|
352806
352979
|
numRenders.current,
|
|
352807
352980
|
" "
|
|
@@ -352809,7 +352982,7 @@ var DebugProfiler = /* @__PURE__ */ __name(() => {
|
|
|
352809
352982
|
}, "DebugProfiler");
|
|
352810
352983
|
|
|
352811
352984
|
// packages/cli/src/ui/components/Footer.tsx
|
|
352812
|
-
var
|
|
352985
|
+
var import_jsx_runtime100 = __toESM(require_jsx_runtime(), 1);
|
|
352813
352986
|
var Footer = /* @__PURE__ */ __name(() => {
|
|
352814
352987
|
const uiState = useUIState();
|
|
352815
352988
|
const config = useConfig();
|
|
@@ -352851,7 +353024,7 @@ var Footer = /* @__PURE__ */ __name(() => {
|
|
|
352851
353024
|
const displayPath = shortenPath(tildeifyPath(targetDir), pathLength);
|
|
352852
353025
|
const justifyContent = hideCWD && hideModelInfo ? "center" : "space-between";
|
|
352853
353026
|
const displayVimMode = vimEnabled ? vimMode : void 0;
|
|
352854
|
-
return /* @__PURE__ */ (0,
|
|
353027
|
+
return /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)(
|
|
352855
353028
|
Box_default,
|
|
352856
353029
|
{
|
|
352857
353030
|
justifyContent,
|
|
@@ -352859,64 +353032,64 @@ var Footer = /* @__PURE__ */ __name(() => {
|
|
|
352859
353032
|
flexDirection: "row",
|
|
352860
353033
|
alignItems: "center",
|
|
352861
353034
|
children: [
|
|
352862
|
-
(debugMode || displayVimMode || !hideCWD) && /* @__PURE__ */ (0,
|
|
352863
|
-
debugMode && /* @__PURE__ */ (0,
|
|
352864
|
-
displayVimMode && /* @__PURE__ */ (0,
|
|
353035
|
+
(debugMode || displayVimMode || !hideCWD) && /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)(Box_default, { children: [
|
|
353036
|
+
debugMode && /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(DebugProfiler, {}),
|
|
353037
|
+
displayVimMode && /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)(Text3, { color: theme.text.secondary, children: [
|
|
352865
353038
|
"[",
|
|
352866
353039
|
displayVimMode,
|
|
352867
353040
|
"] "
|
|
352868
353041
|
] }),
|
|
352869
|
-
!hideCWD && (nightly ? /* @__PURE__ */ (0,
|
|
353042
|
+
!hideCWD && (nightly ? /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(dist_default4, { colors: theme.ui.gradient, children: /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)(Text3, { children: [
|
|
352870
353043
|
displayPath,
|
|
352871
|
-
branchName && /* @__PURE__ */ (0,
|
|
353044
|
+
branchName && /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)(Text3, { children: [
|
|
352872
353045
|
" (",
|
|
352873
353046
|
branchName,
|
|
352874
353047
|
"*)"
|
|
352875
353048
|
] })
|
|
352876
|
-
] }) }) : /* @__PURE__ */ (0,
|
|
353049
|
+
] }) }) : /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)(Text3, { color: theme.text.link, children: [
|
|
352877
353050
|
displayPath,
|
|
352878
|
-
branchName && /* @__PURE__ */ (0,
|
|
353051
|
+
branchName && /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)(Text3, { color: theme.text.secondary, children: [
|
|
352879
353052
|
" (",
|
|
352880
353053
|
branchName,
|
|
352881
353054
|
"*)"
|
|
352882
353055
|
] })
|
|
352883
353056
|
] })),
|
|
352884
|
-
debugMode && /* @__PURE__ */ (0,
|
|
353057
|
+
debugMode && /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(Text3, { color: theme.status.error, children: " " + (debugMessage || "--debug") })
|
|
352885
353058
|
] }),
|
|
352886
|
-
!hideSandboxStatus && /* @__PURE__ */ (0,
|
|
353059
|
+
!hideSandboxStatus && /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
|
|
352887
353060
|
Box_default,
|
|
352888
353061
|
{
|
|
352889
353062
|
flexGrow: 1,
|
|
352890
353063
|
alignItems: "center",
|
|
352891
353064
|
justifyContent: "center",
|
|
352892
353065
|
display: "flex",
|
|
352893
|
-
children: isTrustedFolder === false ? /* @__PURE__ */ (0,
|
|
353066
|
+
children: isTrustedFolder === false ? /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(Text3, { color: theme.status.warning, children: "untrusted" }) : process36.env["SANDBOX"] && process36.env["SANDBOX"] !== "sandbox-exec" ? /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(Text3, { color: "green", children: process36.env["SANDBOX"].replace(/^OSA-(?:cli-)?/, "") }) : process36.env["SANDBOX"] === "sandbox-exec" ? /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)(Text3, { color: theme.status.warning, children: [
|
|
352894
353067
|
"macOS Seatbelt",
|
|
352895
353068
|
" ",
|
|
352896
|
-
/* @__PURE__ */ (0,
|
|
353069
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsxs)(Text3, { color: theme.text.secondary, children: [
|
|
352897
353070
|
"(",
|
|
352898
353071
|
process36.env["SEATBELT_PROFILE"],
|
|
352899
353072
|
")"
|
|
352900
353073
|
] })
|
|
352901
|
-
] }) : /* @__PURE__ */ (0,
|
|
353074
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)(Text3, { color: theme.status.error, children: [
|
|
352902
353075
|
"no sandbox",
|
|
352903
|
-
terminalWidth >= 100 && /* @__PURE__ */ (0,
|
|
353076
|
+
terminalWidth >= 100 && /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(Text3, { color: theme.text.secondary, children: " (see /docs)" })
|
|
352904
353077
|
] })
|
|
352905
353078
|
}
|
|
352906
353079
|
),
|
|
352907
|
-
!hideModelInfo && /* @__PURE__ */ (0,
|
|
352908
|
-
/* @__PURE__ */ (0,
|
|
352909
|
-
/* @__PURE__ */ (0,
|
|
352910
|
-
systemPromptPreset && /* @__PURE__ */ (0,
|
|
353080
|
+
!hideModelInfo && /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)(Box_default, { alignItems: "center", justifyContent: "flex-end", children: [
|
|
353081
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsxs)(Box_default, { alignItems: "center", children: [
|
|
353082
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsxs)(Box_default, { flexDirection: "row", alignItems: "center", children: [
|
|
353083
|
+
systemPromptPreset && /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)(Text3, { color: theme.text.secondary, children: [
|
|
352911
353084
|
"sp (",
|
|
352912
353085
|
systemPromptPreset,
|
|
352913
353086
|
")",
|
|
352914
|
-
/* @__PURE__ */ (0,
|
|
353087
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)(Text3, { color: theme.ui.symbol, children: " \xB7 " })
|
|
352915
353088
|
] }),
|
|
352916
|
-
/* @__PURE__ */ (0,
|
|
353089
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsxs)(Text3, { color: theme.text.accent, children: [
|
|
352917
353090
|
model,
|
|
352918
353091
|
" ",
|
|
352919
|
-
/* @__PURE__ */ (0,
|
|
353092
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
|
|
352920
353093
|
ContextUsageDisplay,
|
|
352921
353094
|
{
|
|
352922
353095
|
promptTokenCount,
|
|
@@ -352926,20 +353099,20 @@ var Footer = /* @__PURE__ */ __name(() => {
|
|
|
352926
353099
|
)
|
|
352927
353100
|
] })
|
|
352928
353101
|
] }),
|
|
352929
|
-
showMemoryUsage && /* @__PURE__ */ (0,
|
|
353102
|
+
showMemoryUsage && /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(MemoryUsageDisplay, {})
|
|
352930
353103
|
] }),
|
|
352931
|
-
/* @__PURE__ */ (0,
|
|
352932
|
-
corgiMode && /* @__PURE__ */ (0,
|
|
352933
|
-
/* @__PURE__ */ (0,
|
|
352934
|
-
/* @__PURE__ */ (0,
|
|
352935
|
-
/* @__PURE__ */ (0,
|
|
352936
|
-
/* @__PURE__ */ (0,
|
|
352937
|
-
/* @__PURE__ */ (0,
|
|
352938
|
-
/* @__PURE__ */ (0,
|
|
353104
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsxs)(Box_default, { alignItems: "center", paddingLeft: 2, children: [
|
|
353105
|
+
corgiMode && /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)(Text3, { children: [
|
|
353106
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)(Text3, { color: theme.ui.symbol, children: "| " }),
|
|
353107
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)(Text3, { color: theme.status.error, children: "\u25BC" }),
|
|
353108
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)(Text3, { color: theme.text.primary, children: "(\xB4" }),
|
|
353109
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)(Text3, { color: theme.status.error, children: "\u1D25" }),
|
|
353110
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)(Text3, { color: theme.text.primary, children: "`)" }),
|
|
353111
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)(Text3, { color: theme.status.error, children: "\u25BC " })
|
|
352939
353112
|
] }),
|
|
352940
|
-
!showErrorDetails && errorCount > 0 && /* @__PURE__ */ (0,
|
|
352941
|
-
/* @__PURE__ */ (0,
|
|
352942
|
-
/* @__PURE__ */ (0,
|
|
353113
|
+
!showErrorDetails && errorCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)(Box_default, { children: [
|
|
353114
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)(Text3, { color: theme.ui.symbol, children: "| " }),
|
|
353115
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)(ConsoleSummaryDisplay, { errorCount })
|
|
352943
353116
|
] })
|
|
352944
353117
|
] })
|
|
352945
353118
|
] })
|
|
@@ -352950,7 +353123,7 @@ var Footer = /* @__PURE__ */ __name(() => {
|
|
|
352950
353123
|
|
|
352951
353124
|
// packages/cli/src/ui/components/QueuedMessageDisplay.tsx
|
|
352952
353125
|
init_esbuild_shims();
|
|
352953
|
-
var
|
|
353126
|
+
var import_jsx_runtime101 = __toESM(require_jsx_runtime(), 1);
|
|
352954
353127
|
var MAX_DISPLAYED_QUEUED_MESSAGES = 3;
|
|
352955
353128
|
var QueuedMessageDisplay = /* @__PURE__ */ __name(({
|
|
352956
353129
|
messageQueue
|
|
@@ -352958,12 +353131,12 @@ var QueuedMessageDisplay = /* @__PURE__ */ __name(({
|
|
|
352958
353131
|
if (messageQueue.length === 0) {
|
|
352959
353132
|
return null;
|
|
352960
353133
|
}
|
|
352961
|
-
return /* @__PURE__ */ (0,
|
|
353134
|
+
return /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)(Box_default, { flexDirection: "column", marginTop: 1, children: [
|
|
352962
353135
|
messageQueue.slice(0, MAX_DISPLAYED_QUEUED_MESSAGES).map((message2, index) => {
|
|
352963
353136
|
const preview = message2.replace(/\s+/g, " ");
|
|
352964
|
-
return /* @__PURE__ */ (0,
|
|
353137
|
+
return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(Box_default, { paddingLeft: 2, width: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(Text3, { dimColor: true, wrap: "truncate", children: preview }) }, index);
|
|
352965
353138
|
}),
|
|
352966
|
-
messageQueue.length > MAX_DISPLAYED_QUEUED_MESSAGES && /* @__PURE__ */ (0,
|
|
353139
|
+
messageQueue.length > MAX_DISPLAYED_QUEUED_MESSAGES && /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(Box_default, { paddingLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)(Text3, { dimColor: true, children: [
|
|
352967
353140
|
"... (+",
|
|
352968
353141
|
messageQueue.length - MAX_DISPLAYED_QUEUED_MESSAGES,
|
|
352969
353142
|
" more)"
|
|
@@ -352974,7 +353147,7 @@ var QueuedMessageDisplay = /* @__PURE__ */ __name(({
|
|
|
352974
353147
|
// packages/cli/src/ui/components/ConfigInitDisplay.tsx
|
|
352975
353148
|
init_esbuild_shims();
|
|
352976
353149
|
var import_react99 = __toESM(require_react(), 1);
|
|
352977
|
-
var
|
|
353150
|
+
var import_jsx_runtime102 = __toESM(require_jsx_runtime(), 1);
|
|
352978
353151
|
var ConfigInitDisplay = /* @__PURE__ */ __name(() => {
|
|
352979
353152
|
const config = useConfig();
|
|
352980
353153
|
const [message2, setMessage] = (0, import_react99.useState)(t2("Initializing..."));
|
|
@@ -353002,15 +353175,15 @@ var ConfigInitDisplay = /* @__PURE__ */ __name(() => {
|
|
|
353002
353175
|
appEvents.off("mcp-client-update", onChange);
|
|
353003
353176
|
};
|
|
353004
353177
|
}, [config]);
|
|
353005
|
-
return /* @__PURE__ */ (0,
|
|
353006
|
-
/* @__PURE__ */ (0,
|
|
353178
|
+
return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)(Text3, { children: [
|
|
353179
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(OSASpinner, {}),
|
|
353007
353180
|
" ",
|
|
353008
|
-
/* @__PURE__ */ (0,
|
|
353181
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(Text3, { color: theme.text.primary, children: message2 })
|
|
353009
353182
|
] }) });
|
|
353010
353183
|
}, "ConfigInitDisplay");
|
|
353011
353184
|
|
|
353012
353185
|
// packages/cli/src/ui/components/Composer.tsx
|
|
353013
|
-
var
|
|
353186
|
+
var import_jsx_runtime103 = __toESM(require_jsx_runtime(), 1);
|
|
353014
353187
|
var Composer = /* @__PURE__ */ __name(() => {
|
|
353015
353188
|
const config = useConfig();
|
|
353016
353189
|
const settings = useSettings();
|
|
@@ -353026,8 +353199,8 @@ var Composer = /* @__PURE__ */ __name(() => {
|
|
|
353026
353199
|
() => calculatePromptWidths(uiState.terminalWidth),
|
|
353027
353200
|
[uiState.terminalWidth]
|
|
353028
353201
|
);
|
|
353029
|
-
return /* @__PURE__ */ (0,
|
|
353030
|
-
!uiState.embeddedShellFocused && /* @__PURE__ */ (0,
|
|
353202
|
+
return /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
353203
|
+
!uiState.embeddedShellFocused && /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
353031
353204
|
LoadingIndicator,
|
|
353032
353205
|
{
|
|
353033
353206
|
thought: uiState.streamingState === "waiting_for_confirmation" /* WaitingForConfirmation */ || config.getAccessibility()?.disableLoadingPhrases ? void 0 : uiState.thought,
|
|
@@ -353035,9 +353208,15 @@ var Composer = /* @__PURE__ */ __name(() => {
|
|
|
353035
353208
|
elapsedTime: uiState.elapsedTime
|
|
353036
353209
|
}
|
|
353037
353210
|
),
|
|
353038
|
-
!uiState.
|
|
353039
|
-
|
|
353040
|
-
|
|
353211
|
+
!uiState.embeddedShellFocused && uiState.streamingState !== "idle" /* Idle */ && /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
353212
|
+
ConsultationDisplay,
|
|
353213
|
+
{
|
|
353214
|
+
isStreamingActive: uiState.streamingState === "responding" /* Responding */
|
|
353215
|
+
}
|
|
353216
|
+
),
|
|
353217
|
+
!uiState.isConfigInitialized && /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(ConfigInitDisplay, {}),
|
|
353218
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(QueuedMessageDisplay, { messageQueue: uiState.messageQueue }),
|
|
353219
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsxs)(
|
|
353041
353220
|
Box_default,
|
|
353042
353221
|
{
|
|
353043
353222
|
marginTop: 1,
|
|
@@ -353046,9 +353225,9 @@ var Composer = /* @__PURE__ */ __name(() => {
|
|
|
353046
353225
|
flexDirection: isNarrow ? "column" : "row",
|
|
353047
353226
|
alignItems: isNarrow ? "flex-start" : "center",
|
|
353048
353227
|
children: [
|
|
353049
|
-
/* @__PURE__ */ (0,
|
|
353050
|
-
process.env["OSA_SYSTEM_MD"] && /* @__PURE__ */ (0,
|
|
353051
|
-
uiState.ctrlCPressedOnce ? /* @__PURE__ */ (0,
|
|
353228
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsxs)(Box_default, { marginRight: 1, children: [
|
|
353229
|
+
process.env["OSA_SYSTEM_MD"] && /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(Text3, { color: theme.status.error, children: "|\u2310\u25A0_\u25A0| " }),
|
|
353230
|
+
uiState.ctrlCPressedOnce ? /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(Text3, { color: theme.status.warning, children: t2("Press Ctrl+C again to exit.") }) : uiState.ctrlDPressedOnce ? /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(Text3, { color: theme.status.warning, children: t2("Press Ctrl+D again to exit.") }) : uiState.showEscapePrompt ? /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(Text3, { color: theme.text.secondary, children: t2("Press Esc again to clear.") }) : !settings.merged.ui?.hideContextSummary && /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
353052
353231
|
ContextSummaryDisplay,
|
|
353053
353232
|
{
|
|
353054
353233
|
ideContext: uiState.ideContextState,
|
|
@@ -353060,15 +353239,15 @@ var Composer = /* @__PURE__ */ __name(() => {
|
|
|
353060
353239
|
}
|
|
353061
353240
|
)
|
|
353062
353241
|
] }),
|
|
353063
|
-
/* @__PURE__ */ (0,
|
|
353064
|
-
showAutoAcceptIndicator !== ApprovalMode.DEFAULT && !uiState.shellModeActive && /* @__PURE__ */ (0,
|
|
353065
|
-
uiState.shellModeActive && /* @__PURE__ */ (0,
|
|
353242
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsxs)(Box_default, { paddingTop: isNarrow ? 1 : 0, children: [
|
|
353243
|
+
showAutoAcceptIndicator !== ApprovalMode.DEFAULT && !uiState.shellModeActive && /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(AutoAcceptIndicator, { approvalMode: showAutoAcceptIndicator }),
|
|
353244
|
+
uiState.shellModeActive && /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(ShellModeIndicator, {})
|
|
353066
353245
|
] })
|
|
353067
353246
|
]
|
|
353068
353247
|
}
|
|
353069
353248
|
),
|
|
353070
|
-
uiState.showErrorDetails && /* @__PURE__ */ (0,
|
|
353071
|
-
/* @__PURE__ */ (0,
|
|
353249
|
+
uiState.showErrorDetails && /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(OverflowProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)(Box_default, { flexDirection: "column", children: [
|
|
353250
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
353072
353251
|
DetailedMessagesDisplay,
|
|
353073
353252
|
{
|
|
353074
353253
|
messages: uiState.filteredConsoleMessages,
|
|
@@ -353076,9 +353255,9 @@ var Composer = /* @__PURE__ */ __name(() => {
|
|
|
353076
353255
|
width: containerWidth
|
|
353077
353256
|
}
|
|
353078
353257
|
),
|
|
353079
|
-
/* @__PURE__ */ (0,
|
|
353258
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(ShowMoreLines, { constrainHeight: uiState.constrainHeight })
|
|
353080
353259
|
] }) }),
|
|
353081
|
-
uiState.isInputActive && /* @__PURE__ */ (0,
|
|
353260
|
+
uiState.isInputActive && /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
353082
353261
|
InputPrompt,
|
|
353083
353262
|
{
|
|
353084
353263
|
buffer: uiState.buffer,
|
|
@@ -353100,37 +353279,37 @@ var Composer = /* @__PURE__ */ __name(() => {
|
|
|
353100
353279
|
placeholder: vimEnabled ? " " + t2("Press 'i' for INSERT mode and 'Esc' for NORMAL mode.") : " " + t2("Type your message or @path/to/file")
|
|
353101
353280
|
}
|
|
353102
353281
|
),
|
|
353103
|
-
!settings.merged.ui?.hideFooter && !isScreenReaderEnabled && /* @__PURE__ */ (0,
|
|
353282
|
+
!settings.merged.ui?.hideFooter && !isScreenReaderEnabled && /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(Footer, {})
|
|
353104
353283
|
] });
|
|
353105
353284
|
}, "Composer");
|
|
353106
353285
|
|
|
353107
353286
|
// packages/cli/src/ui/components/ExitWarning.tsx
|
|
353108
353287
|
init_esbuild_shims();
|
|
353109
|
-
var
|
|
353288
|
+
var import_jsx_runtime104 = __toESM(require_jsx_runtime(), 1);
|
|
353110
353289
|
var ExitWarning = /* @__PURE__ */ __name(() => {
|
|
353111
353290
|
const uiState = useUIState();
|
|
353112
|
-
return /* @__PURE__ */ (0,
|
|
353113
|
-
uiState.dialogsVisible && uiState.ctrlCPressedOnce && /* @__PURE__ */ (0,
|
|
353114
|
-
uiState.dialogsVisible && uiState.ctrlDPressedOnce && /* @__PURE__ */ (0,
|
|
353291
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(import_jsx_runtime104.Fragment, { children: [
|
|
353292
|
+
uiState.dialogsVisible && uiState.ctrlCPressedOnce && /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(Text3, { color: theme.status.warning, children: "Press Ctrl+C again to exit." }) }),
|
|
353293
|
+
uiState.dialogsVisible && uiState.ctrlDPressedOnce && /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(Text3, { color: theme.status.warning, children: "Press Ctrl+D again to exit." }) })
|
|
353115
353294
|
] });
|
|
353116
353295
|
}, "ExitWarning");
|
|
353117
353296
|
|
|
353118
353297
|
// packages/cli/src/ui/layouts/ScreenReaderAppLayout.tsx
|
|
353119
|
-
var
|
|
353298
|
+
var import_jsx_runtime105 = __toESM(require_jsx_runtime(), 1);
|
|
353120
353299
|
var ScreenReaderAppLayout = /* @__PURE__ */ __name(() => {
|
|
353121
353300
|
const uiState = useUIState();
|
|
353122
|
-
return /* @__PURE__ */ (0,
|
|
353123
|
-
/* @__PURE__ */ (0,
|
|
353124
|
-
/* @__PURE__ */ (0,
|
|
353125
|
-
/* @__PURE__ */ (0,
|
|
353126
|
-
uiState.dialogsVisible ? /* @__PURE__ */ (0,
|
|
353301
|
+
return /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(Box_default, { flexDirection: "column", width: "90%", height: "100%", children: [
|
|
353302
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(Notifications, {}),
|
|
353303
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(Footer, {}),
|
|
353304
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(Box_default, { flexGrow: 1, overflow: "hidden", children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(MainContent, {}) }),
|
|
353305
|
+
uiState.dialogsVisible ? /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
353127
353306
|
DialogManager,
|
|
353128
353307
|
{
|
|
353129
353308
|
terminalWidth: uiState.terminalWidth,
|
|
353130
353309
|
addItem: uiState.historyManager.addItem
|
|
353131
353310
|
}
|
|
353132
|
-
) : /* @__PURE__ */ (0,
|
|
353133
|
-
/* @__PURE__ */ (0,
|
|
353311
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(Composer, {}),
|
|
353312
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(ExitWarning, {})
|
|
353134
353313
|
] });
|
|
353135
353314
|
}, "ScreenReaderAppLayout");
|
|
353136
353315
|
|
|
@@ -353139,7 +353318,7 @@ init_esbuild_shims();
|
|
|
353139
353318
|
|
|
353140
353319
|
// packages/cli/src/ui/components/TaskMasterPanel.tsx
|
|
353141
353320
|
init_esbuild_shims();
|
|
353142
|
-
var
|
|
353321
|
+
var import_jsx_runtime106 = __toESM(require_jsx_runtime(), 1);
|
|
353143
353322
|
var STATUS_ICONS2 = {
|
|
353144
353323
|
pending: "\u25CB",
|
|
353145
353324
|
in_progress: "\u25D0",
|
|
@@ -353157,13 +353336,13 @@ var TaskMasterPanel = /* @__PURE__ */ __name(({
|
|
|
353157
353336
|
const totalCount = todos.length;
|
|
353158
353337
|
const progressPercent = Math.round(completedCount / totalCount * 100);
|
|
353159
353338
|
if (compact && activeTodo) {
|
|
353160
|
-
return /* @__PURE__ */ (0,
|
|
353161
|
-
/* @__PURE__ */ (0,
|
|
353162
|
-
/* @__PURE__ */ (0,
|
|
353339
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(Box_default, { marginBottom: 1, children: [
|
|
353340
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(Text3, { color: theme.text.secondary, children: [
|
|
353341
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(build_default, { type: "dots" }),
|
|
353163
353342
|
" "
|
|
353164
353343
|
] }),
|
|
353165
|
-
/* @__PURE__ */ (0,
|
|
353166
|
-
/* @__PURE__ */ (0,
|
|
353344
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(Text3, { color: theme.status.success, children: activeTodo.activeForm || activeTodo.content }),
|
|
353345
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(Text3, { color: theme.text.secondary, children: [
|
|
353167
353346
|
" ",
|
|
353168
353347
|
"(",
|
|
353169
353348
|
completedCount,
|
|
@@ -353173,7 +353352,7 @@ var TaskMasterPanel = /* @__PURE__ */ __name(({
|
|
|
353173
353352
|
] })
|
|
353174
353353
|
] });
|
|
353175
353354
|
}
|
|
353176
|
-
return /* @__PURE__ */ (0,
|
|
353355
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(
|
|
353177
353356
|
Box_default,
|
|
353178
353357
|
{
|
|
353179
353358
|
flexDirection: "column",
|
|
@@ -353182,9 +353361,9 @@ var TaskMasterPanel = /* @__PURE__ */ __name(({
|
|
|
353182
353361
|
paddingX: 1,
|
|
353183
353362
|
marginBottom: 1,
|
|
353184
353363
|
children: [
|
|
353185
|
-
/* @__PURE__ */ (0,
|
|
353186
|
-
/* @__PURE__ */ (0,
|
|
353187
|
-
/* @__PURE__ */ (0,
|
|
353364
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(Box_default, { justifyContent: "space-between", children: [
|
|
353365
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(Text3, { color: theme.text.accent, bold: true, children: "Tasks" }),
|
|
353366
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(Text3, { color: theme.text.secondary, children: [
|
|
353188
353367
|
completedCount,
|
|
353189
353368
|
"/",
|
|
353190
353369
|
totalCount,
|
|
@@ -353193,17 +353372,17 @@ var TaskMasterPanel = /* @__PURE__ */ __name(({
|
|
|
353193
353372
|
"%)"
|
|
353194
353373
|
] })
|
|
353195
353374
|
] }),
|
|
353196
|
-
/* @__PURE__ */ (0,
|
|
353197
|
-
/* @__PURE__ */ (0,
|
|
353198
|
-
/* @__PURE__ */ (0,
|
|
353375
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(Box_default, { marginY: 0, children: [
|
|
353376
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(Text3, { color: theme.status.success, children: "\u2588".repeat(Math.round(progressPercent / 100 * 20)) }),
|
|
353377
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(Text3, { color: theme.text.secondary, children: "\u2591".repeat(20 - Math.round(progressPercent / 100 * 20)) })
|
|
353199
353378
|
] }),
|
|
353200
|
-
/* @__PURE__ */ (0,
|
|
353379
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(Box_default, { flexDirection: "column", children: todos.map((todo) => {
|
|
353201
353380
|
const isCompleted = todo.status === "completed";
|
|
353202
353381
|
const isInProgress = todo.status === "in_progress";
|
|
353203
353382
|
const itemColor = isCompleted ? theme.text.secondary : isInProgress ? theme.status.success : theme.text.primary;
|
|
353204
|
-
return /* @__PURE__ */ (0,
|
|
353205
|
-
/* @__PURE__ */ (0,
|
|
353206
|
-
/* @__PURE__ */ (0,
|
|
353383
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(Box_default, { flexDirection: "row", minHeight: 1, children: [
|
|
353384
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(Box_default, { width: 3, children: isInProgress ? /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(Text3, { color: itemColor, children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(build_default, { type: "dots" }) }) : /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(Text3, { color: itemColor, children: STATUS_ICONS2[todo.status] }) }),
|
|
353385
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(Box_default, { flexGrow: 1, children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
353207
353386
|
Text3,
|
|
353208
353387
|
{
|
|
353209
353388
|
color: itemColor,
|
|
@@ -353220,30 +353399,30 @@ var TaskMasterPanel = /* @__PURE__ */ __name(({
|
|
|
353220
353399
|
}, "TaskMasterPanel");
|
|
353221
353400
|
|
|
353222
353401
|
// packages/cli/src/ui/layouts/DefaultAppLayout.tsx
|
|
353223
|
-
var
|
|
353402
|
+
var import_jsx_runtime107 = __toESM(require_jsx_runtime(), 1);
|
|
353224
353403
|
var DefaultAppLayout = /* @__PURE__ */ __name(({
|
|
353225
353404
|
width = "90%"
|
|
353226
353405
|
}) => {
|
|
353227
353406
|
const uiState = useUIState();
|
|
353228
|
-
return /* @__PURE__ */ (0,
|
|
353229
|
-
/* @__PURE__ */ (0,
|
|
353230
|
-
/* @__PURE__ */ (0,
|
|
353231
|
-
/* @__PURE__ */ (0,
|
|
353232
|
-
/* @__PURE__ */ (0,
|
|
353233
|
-
uiState.dialogsVisible ? /* @__PURE__ */ (0,
|
|
353407
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(Box_default, { flexDirection: "column", width, children: [
|
|
353408
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)(MainContent, {}),
|
|
353409
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(Box_default, { flexDirection: "column", ref: uiState.mainControlsRef, children: [
|
|
353410
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)(Notifications, {}),
|
|
353411
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)(TaskMasterPanel, { compact: true }),
|
|
353412
|
+
uiState.dialogsVisible ? /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
353234
353413
|
DialogManager,
|
|
353235
353414
|
{
|
|
353236
353415
|
terminalWidth: uiState.terminalWidth,
|
|
353237
353416
|
addItem: uiState.historyManager.addItem
|
|
353238
353417
|
}
|
|
353239
|
-
) : /* @__PURE__ */ (0,
|
|
353240
|
-
/* @__PURE__ */ (0,
|
|
353418
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(Composer, {}),
|
|
353419
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)(ExitWarning, {})
|
|
353241
353420
|
] })
|
|
353242
353421
|
] });
|
|
353243
353422
|
}, "DefaultAppLayout");
|
|
353244
353423
|
|
|
353245
353424
|
// packages/cli/src/ui/App.tsx
|
|
353246
|
-
var
|
|
353425
|
+
var import_jsx_runtime108 = __toESM(require_jsx_runtime(), 1);
|
|
353247
353426
|
var getContainerWidth = /* @__PURE__ */ __name((terminalWidth) => {
|
|
353248
353427
|
if (terminalWidth <= 80) {
|
|
353249
353428
|
return "98%";
|
|
@@ -353261,9 +353440,9 @@ var App2 = /* @__PURE__ */ __name(() => {
|
|
|
353261
353440
|
const { columns } = useTerminalSize();
|
|
353262
353441
|
const containerWidth = getContainerWidth(columns);
|
|
353263
353442
|
if (uiState.quittingMessages) {
|
|
353264
|
-
return /* @__PURE__ */ (0,
|
|
353443
|
+
return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(QuittingDisplay, {});
|
|
353265
353444
|
}
|
|
353266
|
-
return /* @__PURE__ */ (0,
|
|
353445
|
+
return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(StreamingContext.Provider, { value: uiState.streamingState, children: isScreenReaderEnabled ? /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(ScreenReaderAppLayout, {}) : /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(DefaultAppLayout, { width: containerWidth }) });
|
|
353267
353446
|
}, "App");
|
|
353268
353447
|
|
|
353269
353448
|
// packages/cli/src/ui/AppContainer.tsx
|
|
@@ -353571,13 +353750,22 @@ var useAuthCommand = /* @__PURE__ */ __name((settings, config, addItem) => {
|
|
|
353571
353750
|
if (credentials) {
|
|
353572
353751
|
config.updateCredentials({
|
|
353573
353752
|
apiKey: credentials.apiKey,
|
|
353574
|
-
baseUrl: credentials.baseUrl || "https://
|
|
353753
|
+
baseUrl: credentials.baseUrl || "https://osa.dev",
|
|
353575
353754
|
model: credentials.model || "qwen3-coder:480b-cloud"
|
|
353576
353755
|
});
|
|
353577
353756
|
await performAuth(authType, scope, credentials);
|
|
353578
353757
|
}
|
|
353579
353758
|
return;
|
|
353580
353759
|
}
|
|
353760
|
+
if (authType === AuthType2.OLLAMA_LOCAL) {
|
|
353761
|
+
config.updateCredentials({
|
|
353762
|
+
apiKey: "ollama",
|
|
353763
|
+
baseUrl: "http://localhost:11434/v1",
|
|
353764
|
+
model: credentials?.model || "qwen2.5-coder:32b"
|
|
353765
|
+
});
|
|
353766
|
+
await performAuth(authType, scope, credentials);
|
|
353767
|
+
return;
|
|
353768
|
+
}
|
|
353581
353769
|
await performAuth(authType, scope);
|
|
353582
353770
|
},
|
|
353583
353771
|
[config, performAuth]
|
|
@@ -353599,15 +353787,19 @@ var useAuthCommand = /* @__PURE__ */ __name((settings, config, addItem) => {
|
|
|
353599
353787
|
}, [isAuthenticating, pendingAuthType, cancelOSAAuth, config]);
|
|
353600
353788
|
(0, import_react104.useEffect)(() => {
|
|
353601
353789
|
const defaultAuthType = process.env["OSA_DEFAULT_AUTH_TYPE"];
|
|
353602
|
-
|
|
353603
|
-
|
|
353604
|
-
|
|
353790
|
+
const validAuthTypes = [
|
|
353791
|
+
AuthType2.OSA_OAUTH,
|
|
353792
|
+
AuthType2.USE_OPENAI,
|
|
353793
|
+
AuthType2.OLLAMA_CLOUD,
|
|
353794
|
+
AuthType2.OLLAMA_LOCAL
|
|
353795
|
+
];
|
|
353796
|
+
if (defaultAuthType && !validAuthTypes.includes(defaultAuthType)) {
|
|
353605
353797
|
onAuthError(
|
|
353606
353798
|
t2(
|
|
353607
353799
|
'Invalid OSA_DEFAULT_AUTH_TYPE value: "{{value}}". Valid values are: {{validValues}}',
|
|
353608
353800
|
{
|
|
353609
353801
|
value: defaultAuthType,
|
|
353610
|
-
validValues:
|
|
353802
|
+
validValues: validAuthTypes.join(", ")
|
|
353611
353803
|
}
|
|
353612
353804
|
)
|
|
353613
353805
|
);
|
|
@@ -360921,7 +361113,7 @@ var useAttentionNotifications = /* @__PURE__ */ __name(({
|
|
|
360921
361113
|
}, "useAttentionNotifications");
|
|
360922
361114
|
|
|
360923
361115
|
// packages/cli/src/ui/AppContainer.tsx
|
|
360924
|
-
var
|
|
361116
|
+
var import_jsx_runtime109 = __toESM(require_jsx_runtime(), 1);
|
|
360925
361117
|
var CTRL_EXIT_PROMPT_DURATION_MS = 1e3;
|
|
360926
361118
|
function isToolExecuting(pendingHistoryItems) {
|
|
360927
361119
|
return pendingHistoryItems.some((item) => {
|
|
@@ -361139,13 +361331,15 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
|
|
|
361139
361331
|
);
|
|
361140
361332
|
} else if (settings.merged.security?.auth?.selectedType && !settings.merged.security?.auth?.useExternal) {
|
|
361141
361333
|
const error = validateAuthMethod(
|
|
361142
|
-
settings.merged.security.auth.selectedType
|
|
361334
|
+
settings.merged.security.auth.selectedType,
|
|
361335
|
+
settings.merged
|
|
361143
361336
|
);
|
|
361144
361337
|
if (error) {
|
|
361145
361338
|
onAuthError(error);
|
|
361146
361339
|
}
|
|
361147
361340
|
}
|
|
361148
361341
|
}, [
|
|
361342
|
+
settings.merged,
|
|
361149
361343
|
settings.merged.security?.auth?.selectedType,
|
|
361150
361344
|
settings.merged.security?.auth?.enforcedType,
|
|
361151
361345
|
settings.merged.security?.auth?.useExternal,
|
|
@@ -361996,14 +362190,14 @@ ${queuedText}` : queuedText;
|
|
|
361996
362190
|
closeAgentsManagerDialog
|
|
361997
362191
|
]
|
|
361998
362192
|
);
|
|
361999
|
-
return /* @__PURE__ */ (0,
|
|
362193
|
+
return /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(UIStateContext.Provider, { value: uiState, children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(UIActionsContext.Provider, { value: uiActions, children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(ConfigContext.Provider, { value: config, children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
362000
362194
|
AppContext2.Provider,
|
|
362001
362195
|
{
|
|
362002
362196
|
value: {
|
|
362003
362197
|
version: props.version,
|
|
362004
362198
|
startupWarnings: props.startupWarnings || []
|
|
362005
362199
|
},
|
|
362006
|
-
children: /* @__PURE__ */ (0,
|
|
362200
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(ShellFocusContext.Provider, { value: isFocused, children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(App2, {}) })
|
|
362007
362201
|
}
|
|
362008
362202
|
) }) }) });
|
|
362009
362203
|
}, "AppContainer");
|
|
@@ -364668,7 +364862,7 @@ function toPermissionOptions(confirmation) {
|
|
|
364668
364862
|
__name(toPermissionOptions, "toPermissionOptions");
|
|
364669
364863
|
|
|
364670
364864
|
// packages/cli/src/gemini.tsx
|
|
364671
|
-
var
|
|
364865
|
+
var import_jsx_runtime110 = __toESM(require_jsx_runtime(), 1);
|
|
364672
364866
|
function validateDnsResolutionOrder(order) {
|
|
364673
364867
|
const defaultValue = "ipv4first";
|
|
364674
364868
|
if (order === void 0) {
|
|
@@ -364733,14 +364927,14 @@ async function startInteractiveUI(config, settings, startupWarnings, workspaceRo
|
|
|
364733
364927
|
const AppWrapper = /* @__PURE__ */ __name(() => {
|
|
364734
364928
|
const kittyProtocolStatus = useKittyKeyboardProtocol();
|
|
364735
364929
|
const nodeMajorVersion = parseInt(process.versions.node.split(".")[0], 10);
|
|
364736
|
-
return /* @__PURE__ */ (0,
|
|
364930
|
+
return /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(SettingsContext.Provider, { value: settings, children: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
364737
364931
|
KeypressProvider,
|
|
364738
364932
|
{
|
|
364739
364933
|
kittyProtocolEnabled: kittyProtocolStatus.enabled,
|
|
364740
364934
|
config,
|
|
364741
364935
|
debugKeystrokeLogging: settings.merged.general?.debugKeystrokeLogging,
|
|
364742
364936
|
pasteWorkaround: process.platform === "win32" || nodeMajorVersion < 20,
|
|
364743
|
-
children: /* @__PURE__ */ (0,
|
|
364937
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(SessionStatsProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(TodoProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(VimModeProvider, { settings, children: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
364744
364938
|
AppContainer,
|
|
364745
364939
|
{
|
|
364746
364940
|
config,
|
|
@@ -364754,7 +364948,7 @@ async function startInteractiveUI(config, settings, startupWarnings, workspaceRo
|
|
|
364754
364948
|
) });
|
|
364755
364949
|
}, "AppWrapper");
|
|
364756
364950
|
const instance = render_default(
|
|
364757
|
-
process.env["DEBUG"] ? /* @__PURE__ */ (0,
|
|
364951
|
+
process.env["DEBUG"] ? /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(import_react138.default.StrictMode, { children: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(AppWrapper, {}) }) : /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(AppWrapper, {}),
|
|
364758
364952
|
{
|
|
364759
364953
|
exitOnCtrlC: false,
|
|
364760
364954
|
isScreenReaderEnabled: config.getScreenReader()
|