@corbat-tech/coco 2.25.11 → 2.25.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/index.js +13 -10
- package/dist/cli/index.js.map +1 -1
- package/dist/index.js +0 -8
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -21662,14 +21662,6 @@ var init_http = __esm({
|
|
|
21662
21662
|
if (this.shouldAttemptOAuth()) {
|
|
21663
21663
|
this.oauthToken = await getStoredMcpOAuthToken(this.config.url);
|
|
21664
21664
|
}
|
|
21665
|
-
const response = await this.sendRequestWithOAuthRetry(
|
|
21666
|
-
"GET",
|
|
21667
|
-
void 0,
|
|
21668
|
-
this.abortController.signal
|
|
21669
|
-
);
|
|
21670
|
-
if (!response.ok && response.status !== 404) {
|
|
21671
|
-
throw new Error(`HTTP ${response.status}: ${response.statusText}`);
|
|
21672
|
-
}
|
|
21673
21665
|
this.connected = true;
|
|
21674
21666
|
} catch (error) {
|
|
21675
21667
|
if (error instanceof MCPError) {
|
|
@@ -53088,6 +53080,9 @@ function formatGitShort(ctx) {
|
|
|
53088
53080
|
const dirty = ctx.isDirty ? chalk.yellow(" \u25CF") : "";
|
|
53089
53081
|
return chalk.dim("\u{1F33F} ") + branch + dirty;
|
|
53090
53082
|
}
|
|
53083
|
+
|
|
53084
|
+
// src/cli/repl/status-bar.ts
|
|
53085
|
+
init_env();
|
|
53091
53086
|
init_full_access_mode();
|
|
53092
53087
|
function formatContextUsage(percent) {
|
|
53093
53088
|
const label = `ctx ${percent.toFixed(0)}%`;
|
|
@@ -53095,12 +53090,19 @@ function formatContextUsage(percent) {
|
|
|
53095
53090
|
if (percent >= 75) return chalk.yellow(label);
|
|
53096
53091
|
return chalk.dim(label);
|
|
53097
53092
|
}
|
|
53093
|
+
function getDisplayModel(config) {
|
|
53094
|
+
const model = config.provider.model?.trim();
|
|
53095
|
+
if (!model || ["default", "none", "null", "undefined"].includes(model.toLowerCase())) {
|
|
53096
|
+
return getDefaultModel(config.provider.type);
|
|
53097
|
+
}
|
|
53098
|
+
return model;
|
|
53099
|
+
}
|
|
53098
53100
|
function formatStatusBar(projectPath, config, gitCtx, contextUsagePercent) {
|
|
53099
53101
|
const parts = [];
|
|
53100
53102
|
const projectName = path39__default.basename(projectPath);
|
|
53101
53103
|
parts.push(chalk.dim("\u{1F4C1} ") + chalk.magenta(projectName));
|
|
53102
53104
|
const providerName = config.provider.type;
|
|
53103
|
-
const modelName = config
|
|
53105
|
+
const modelName = getDisplayModel(config);
|
|
53104
53106
|
parts.push(chalk.dim(`${providerName}/`) + chalk.cyan(modelName));
|
|
53105
53107
|
if (isQualityLoop()) {
|
|
53106
53108
|
parts.push(chalk.green("\u{1F504} quality loop"));
|
|
@@ -54216,7 +54218,8 @@ async function printWelcome(session, gitCtx, mcpManager) {
|
|
|
54216
54218
|
const parentPath = lastSep > 0 ? displayPath.slice(0, lastSep + 1) : "";
|
|
54217
54219
|
const projectName = lastSep > 0 ? displayPath.slice(lastSep + 1) : displayPath;
|
|
54218
54220
|
const providerName = session.config.provider.type;
|
|
54219
|
-
const
|
|
54221
|
+
const configuredModel = session.config.provider.model?.trim();
|
|
54222
|
+
const modelName = configuredModel && !["default", "none", "null", "undefined"].includes(configuredModel.toLowerCase()) ? configuredModel : getDefaultModel(session.config.provider.type);
|
|
54220
54223
|
const trustText = trustLevel === "full" ? "full" : trustLevel === "write" ? "write" : trustLevel === "read" ? "read" : "";
|
|
54221
54224
|
console.log();
|
|
54222
54225
|
console.log(chalk.dim(` \u{1F4C1} ${parentPath}`) + chalk.magenta.bold(projectName));
|