ur-agent 1.15.0 → 1.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +30 -0
- package/README.md +3 -1
- package/dist/cli.js +1211 -860
- package/docs/AGENT_FEATURES.md +8 -0
- package/docs/AGENT_UPGRADE_1.16.0.md +102 -0
- package/docs/CODE_FEATURE_INVENTORY.md +1 -1
- package/docs/CONFIGURATION.md +51 -4
- package/docs/USAGE.md +19 -1
- package/docs/VALIDATION.md +21 -2
- package/extensions/vscode-ur-inline-diffs/package.json +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -16939,7 +16939,7 @@ function formatAgentTrendReport(report = buildAgentTrendReport()) {
|
|
|
16939
16939
|
function formatA2AAgentCard(options = {}, pretty = true) {
|
|
16940
16940
|
return JSON.stringify(buildA2AAgentCard(options), null, pretty ? 2 : 0);
|
|
16941
16941
|
}
|
|
16942
|
-
var urVersion = "1.
|
|
16942
|
+
var urVersion = "1.16.1", coverage, priorityRoadmap;
|
|
16943
16943
|
var init_trends = __esm(() => {
|
|
16944
16944
|
coverage = [
|
|
16945
16945
|
{
|
|
@@ -48872,581 +48872,6 @@ var init_keys2 = __esm(() => {
|
|
|
48872
48872
|
init_envUtils();
|
|
48873
48873
|
});
|
|
48874
48874
|
|
|
48875
|
-
// src/constants/oauth.ts
|
|
48876
|
-
var exports_oauth = {};
|
|
48877
|
-
__export(exports_oauth, {
|
|
48878
|
-
getOauthConfig: () => getOauthConfig,
|
|
48879
|
-
fileSuffixForOauthConfig: () => fileSuffixForOauthConfig,
|
|
48880
|
-
UR_AI_PROFILE_SCOPE: () => UR_AI_PROFILE_SCOPE,
|
|
48881
|
-
UR_AI_OAUTH_SCOPES: () => UR_AI_OAUTH_SCOPES,
|
|
48882
|
-
UR_AI_INFERENCE_SCOPE: () => UR_AI_INFERENCE_SCOPE,
|
|
48883
|
-
OAUTH_BETA_HEADER: () => OAUTH_BETA_HEADER,
|
|
48884
|
-
MCP_CLIENT_METADATA_URL: () => MCP_CLIENT_METADATA_URL,
|
|
48885
|
-
CONSOLE_OAUTH_SCOPES: () => CONSOLE_OAUTH_SCOPES,
|
|
48886
|
-
ALL_OAUTH_SCOPES: () => ALL_OAUTH_SCOPES
|
|
48887
|
-
});
|
|
48888
|
-
function fileSuffixForOauthConfig() {
|
|
48889
|
-
return "";
|
|
48890
|
-
}
|
|
48891
|
-
function getOauthConfig() {
|
|
48892
|
-
return {
|
|
48893
|
-
BASE_API_URL: "http://localhost:11434",
|
|
48894
|
-
UR_AI_ORIGIN: "",
|
|
48895
|
-
UR_AI_AUTHORIZE_URL: "",
|
|
48896
|
-
CONSOLE_AUTHORIZE_URL: "",
|
|
48897
|
-
CLIENT_ID: "",
|
|
48898
|
-
MANUAL_REDIRECT_URL: "",
|
|
48899
|
-
TOKEN_URL: "",
|
|
48900
|
-
URAI_SUCCESS_URL: "",
|
|
48901
|
-
CONSOLE_SUCCESS_URL: "",
|
|
48902
|
-
ROLES_URL: "",
|
|
48903
|
-
API_KEY_URL: "",
|
|
48904
|
-
OAUTH_FILE_SUFFIX: ""
|
|
48905
|
-
};
|
|
48906
|
-
}
|
|
48907
|
-
var UR_AI_INFERENCE_SCOPE = "user:inference", UR_AI_PROFILE_SCOPE = "user:profile", CONSOLE_SCOPE = "org:create_api_key", OAUTH_BETA_HEADER = "oauth-2025-04-20", CONSOLE_OAUTH_SCOPES, UR_AI_OAUTH_SCOPES, ALL_OAUTH_SCOPES, MCP_CLIENT_METADATA_URL = "";
|
|
48908
|
-
var init_oauth = __esm(() => {
|
|
48909
|
-
init_envUtils();
|
|
48910
|
-
CONSOLE_OAUTH_SCOPES = [
|
|
48911
|
-
CONSOLE_SCOPE,
|
|
48912
|
-
UR_AI_PROFILE_SCOPE
|
|
48913
|
-
];
|
|
48914
|
-
UR_AI_OAUTH_SCOPES = [
|
|
48915
|
-
UR_AI_PROFILE_SCOPE,
|
|
48916
|
-
UR_AI_INFERENCE_SCOPE,
|
|
48917
|
-
"user:sessions:ur",
|
|
48918
|
-
"user:mcp_servers",
|
|
48919
|
-
"user:file_upload"
|
|
48920
|
-
];
|
|
48921
|
-
ALL_OAUTH_SCOPES = Array.from(new Set([...CONSOLE_OAUTH_SCOPES, ...UR_AI_OAUTH_SCOPES]));
|
|
48922
|
-
});
|
|
48923
|
-
|
|
48924
|
-
// node_modules/chalk/source/vendor/ansi-styles/index.js
|
|
48925
|
-
function assembleStyles() {
|
|
48926
|
-
const codes = new Map;
|
|
48927
|
-
for (const [groupName, group] of Object.entries(styles)) {
|
|
48928
|
-
for (const [styleName, style] of Object.entries(group)) {
|
|
48929
|
-
styles[styleName] = {
|
|
48930
|
-
open: `\x1B[${style[0]}m`,
|
|
48931
|
-
close: `\x1B[${style[1]}m`
|
|
48932
|
-
};
|
|
48933
|
-
group[styleName] = styles[styleName];
|
|
48934
|
-
codes.set(style[0], style[1]);
|
|
48935
|
-
}
|
|
48936
|
-
Object.defineProperty(styles, groupName, {
|
|
48937
|
-
value: group,
|
|
48938
|
-
enumerable: false
|
|
48939
|
-
});
|
|
48940
|
-
}
|
|
48941
|
-
Object.defineProperty(styles, "codes", {
|
|
48942
|
-
value: codes,
|
|
48943
|
-
enumerable: false
|
|
48944
|
-
});
|
|
48945
|
-
styles.color.close = "\x1B[39m";
|
|
48946
|
-
styles.bgColor.close = "\x1B[49m";
|
|
48947
|
-
styles.color.ansi = wrapAnsi16();
|
|
48948
|
-
styles.color.ansi256 = wrapAnsi256();
|
|
48949
|
-
styles.color.ansi16m = wrapAnsi16m();
|
|
48950
|
-
styles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
|
|
48951
|
-
styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
|
|
48952
|
-
styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
|
|
48953
|
-
Object.defineProperties(styles, {
|
|
48954
|
-
rgbToAnsi256: {
|
|
48955
|
-
value(red2, green2, blue2) {
|
|
48956
|
-
if (red2 === green2 && green2 === blue2) {
|
|
48957
|
-
if (red2 < 8) {
|
|
48958
|
-
return 16;
|
|
48959
|
-
}
|
|
48960
|
-
if (red2 > 248) {
|
|
48961
|
-
return 231;
|
|
48962
|
-
}
|
|
48963
|
-
return Math.round((red2 - 8) / 247 * 24) + 232;
|
|
48964
|
-
}
|
|
48965
|
-
return 16 + 36 * Math.round(red2 / 255 * 5) + 6 * Math.round(green2 / 255 * 5) + Math.round(blue2 / 255 * 5);
|
|
48966
|
-
},
|
|
48967
|
-
enumerable: false
|
|
48968
|
-
},
|
|
48969
|
-
hexToRgb: {
|
|
48970
|
-
value(hex) {
|
|
48971
|
-
const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
|
|
48972
|
-
if (!matches) {
|
|
48973
|
-
return [0, 0, 0];
|
|
48974
|
-
}
|
|
48975
|
-
let [colorString] = matches;
|
|
48976
|
-
if (colorString.length === 3) {
|
|
48977
|
-
colorString = [...colorString].map((character) => character + character).join("");
|
|
48978
|
-
}
|
|
48979
|
-
const integer2 = Number.parseInt(colorString, 16);
|
|
48980
|
-
return [
|
|
48981
|
-
integer2 >> 16 & 255,
|
|
48982
|
-
integer2 >> 8 & 255,
|
|
48983
|
-
integer2 & 255
|
|
48984
|
-
];
|
|
48985
|
-
},
|
|
48986
|
-
enumerable: false
|
|
48987
|
-
},
|
|
48988
|
-
hexToAnsi256: {
|
|
48989
|
-
value: (hex) => styles.rgbToAnsi256(...styles.hexToRgb(hex)),
|
|
48990
|
-
enumerable: false
|
|
48991
|
-
},
|
|
48992
|
-
ansi256ToAnsi: {
|
|
48993
|
-
value(code) {
|
|
48994
|
-
if (code < 8) {
|
|
48995
|
-
return 30 + code;
|
|
48996
|
-
}
|
|
48997
|
-
if (code < 16) {
|
|
48998
|
-
return 90 + (code - 8);
|
|
48999
|
-
}
|
|
49000
|
-
let red2;
|
|
49001
|
-
let green2;
|
|
49002
|
-
let blue2;
|
|
49003
|
-
if (code >= 232) {
|
|
49004
|
-
red2 = ((code - 232) * 10 + 8) / 255;
|
|
49005
|
-
green2 = red2;
|
|
49006
|
-
blue2 = red2;
|
|
49007
|
-
} else {
|
|
49008
|
-
code -= 16;
|
|
49009
|
-
const remainder = code % 36;
|
|
49010
|
-
red2 = Math.floor(code / 36) / 5;
|
|
49011
|
-
green2 = Math.floor(remainder / 6) / 5;
|
|
49012
|
-
blue2 = remainder % 6 / 5;
|
|
49013
|
-
}
|
|
49014
|
-
const value = Math.max(red2, green2, blue2) * 2;
|
|
49015
|
-
if (value === 0) {
|
|
49016
|
-
return 30;
|
|
49017
|
-
}
|
|
49018
|
-
let result = 30 + (Math.round(blue2) << 2 | Math.round(green2) << 1 | Math.round(red2));
|
|
49019
|
-
if (value === 2) {
|
|
49020
|
-
result += 60;
|
|
49021
|
-
}
|
|
49022
|
-
return result;
|
|
49023
|
-
},
|
|
49024
|
-
enumerable: false
|
|
49025
|
-
},
|
|
49026
|
-
rgbToAnsi: {
|
|
49027
|
-
value: (red2, green2, blue2) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red2, green2, blue2)),
|
|
49028
|
-
enumerable: false
|
|
49029
|
-
},
|
|
49030
|
-
hexToAnsi: {
|
|
49031
|
-
value: (hex) => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)),
|
|
49032
|
-
enumerable: false
|
|
49033
|
-
}
|
|
49034
|
-
});
|
|
49035
|
-
return styles;
|
|
49036
|
-
}
|
|
49037
|
-
var ANSI_BACKGROUND_OFFSET = 10, wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`, wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`, wrapAnsi16m = (offset = 0) => (red2, green2, blue2) => `\x1B[${38 + offset};2;${red2};${green2};${blue2}m`, styles, modifierNames, foregroundColorNames, backgroundColorNames, colorNames, ansiStyles, ansi_styles_default;
|
|
49038
|
-
var init_ansi_styles = __esm(() => {
|
|
49039
|
-
styles = {
|
|
49040
|
-
modifier: {
|
|
49041
|
-
reset: [0, 0],
|
|
49042
|
-
bold: [1, 22],
|
|
49043
|
-
dim: [2, 22],
|
|
49044
|
-
italic: [3, 23],
|
|
49045
|
-
underline: [4, 24],
|
|
49046
|
-
overline: [53, 55],
|
|
49047
|
-
inverse: [7, 27],
|
|
49048
|
-
hidden: [8, 28],
|
|
49049
|
-
strikethrough: [9, 29]
|
|
49050
|
-
},
|
|
49051
|
-
color: {
|
|
49052
|
-
black: [30, 39],
|
|
49053
|
-
red: [31, 39],
|
|
49054
|
-
green: [32, 39],
|
|
49055
|
-
yellow: [33, 39],
|
|
49056
|
-
blue: [34, 39],
|
|
49057
|
-
magenta: [35, 39],
|
|
49058
|
-
cyan: [36, 39],
|
|
49059
|
-
white: [37, 39],
|
|
49060
|
-
blackBright: [90, 39],
|
|
49061
|
-
gray: [90, 39],
|
|
49062
|
-
grey: [90, 39],
|
|
49063
|
-
redBright: [91, 39],
|
|
49064
|
-
greenBright: [92, 39],
|
|
49065
|
-
yellowBright: [93, 39],
|
|
49066
|
-
blueBright: [94, 39],
|
|
49067
|
-
magentaBright: [95, 39],
|
|
49068
|
-
cyanBright: [96, 39],
|
|
49069
|
-
whiteBright: [97, 39]
|
|
49070
|
-
},
|
|
49071
|
-
bgColor: {
|
|
49072
|
-
bgBlack: [40, 49],
|
|
49073
|
-
bgRed: [41, 49],
|
|
49074
|
-
bgGreen: [42, 49],
|
|
49075
|
-
bgYellow: [43, 49],
|
|
49076
|
-
bgBlue: [44, 49],
|
|
49077
|
-
bgMagenta: [45, 49],
|
|
49078
|
-
bgCyan: [46, 49],
|
|
49079
|
-
bgWhite: [47, 49],
|
|
49080
|
-
bgBlackBright: [100, 49],
|
|
49081
|
-
bgGray: [100, 49],
|
|
49082
|
-
bgGrey: [100, 49],
|
|
49083
|
-
bgRedBright: [101, 49],
|
|
49084
|
-
bgGreenBright: [102, 49],
|
|
49085
|
-
bgYellowBright: [103, 49],
|
|
49086
|
-
bgBlueBright: [104, 49],
|
|
49087
|
-
bgMagentaBright: [105, 49],
|
|
49088
|
-
bgCyanBright: [106, 49],
|
|
49089
|
-
bgWhiteBright: [107, 49]
|
|
49090
|
-
}
|
|
49091
|
-
};
|
|
49092
|
-
modifierNames = Object.keys(styles.modifier);
|
|
49093
|
-
foregroundColorNames = Object.keys(styles.color);
|
|
49094
|
-
backgroundColorNames = Object.keys(styles.bgColor);
|
|
49095
|
-
colorNames = [...foregroundColorNames, ...backgroundColorNames];
|
|
49096
|
-
ansiStyles = assembleStyles();
|
|
49097
|
-
ansi_styles_default = ansiStyles;
|
|
49098
|
-
});
|
|
49099
|
-
|
|
49100
|
-
// node_modules/chalk/source/vendor/supports-color/index.js
|
|
49101
|
-
import process12 from "process";
|
|
49102
|
-
import os2 from "os";
|
|
49103
|
-
import tty3 from "tty";
|
|
49104
|
-
function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : process12.argv) {
|
|
49105
|
-
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
49106
|
-
const position2 = argv.indexOf(prefix + flag);
|
|
49107
|
-
const terminatorPosition = argv.indexOf("--");
|
|
49108
|
-
return position2 !== -1 && (terminatorPosition === -1 || position2 < terminatorPosition);
|
|
49109
|
-
}
|
|
49110
|
-
function envForceColor() {
|
|
49111
|
-
if ("FORCE_COLOR" in env2) {
|
|
49112
|
-
if (env2.FORCE_COLOR === "true") {
|
|
49113
|
-
return 1;
|
|
49114
|
-
}
|
|
49115
|
-
if (env2.FORCE_COLOR === "false") {
|
|
49116
|
-
return 0;
|
|
49117
|
-
}
|
|
49118
|
-
return env2.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env2.FORCE_COLOR, 10), 3);
|
|
49119
|
-
}
|
|
49120
|
-
}
|
|
49121
|
-
function translateLevel(level) {
|
|
49122
|
-
if (level === 0) {
|
|
49123
|
-
return false;
|
|
49124
|
-
}
|
|
49125
|
-
return {
|
|
49126
|
-
level,
|
|
49127
|
-
hasBasic: true,
|
|
49128
|
-
has256: level >= 2,
|
|
49129
|
-
has16m: level >= 3
|
|
49130
|
-
};
|
|
49131
|
-
}
|
|
49132
|
-
function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
49133
|
-
const noFlagForceColor = envForceColor();
|
|
49134
|
-
if (noFlagForceColor !== undefined) {
|
|
49135
|
-
flagForceColor = noFlagForceColor;
|
|
49136
|
-
}
|
|
49137
|
-
const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
|
|
49138
|
-
if (forceColor === 0) {
|
|
49139
|
-
return 0;
|
|
49140
|
-
}
|
|
49141
|
-
if (sniffFlags) {
|
|
49142
|
-
if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
|
|
49143
|
-
return 3;
|
|
49144
|
-
}
|
|
49145
|
-
if (hasFlag("color=256")) {
|
|
49146
|
-
return 2;
|
|
49147
|
-
}
|
|
49148
|
-
}
|
|
49149
|
-
if ("TF_BUILD" in env2 && "AGENT_NAME" in env2) {
|
|
49150
|
-
return 1;
|
|
49151
|
-
}
|
|
49152
|
-
if (haveStream && !streamIsTTY && forceColor === undefined) {
|
|
49153
|
-
return 0;
|
|
49154
|
-
}
|
|
49155
|
-
const min = forceColor || 0;
|
|
49156
|
-
if (env2.TERM === "dumb") {
|
|
49157
|
-
return min;
|
|
49158
|
-
}
|
|
49159
|
-
if (process12.platform === "win32") {
|
|
49160
|
-
const osRelease = os2.release().split(".");
|
|
49161
|
-
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
49162
|
-
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
49163
|
-
}
|
|
49164
|
-
return 1;
|
|
49165
|
-
}
|
|
49166
|
-
if ("CI" in env2) {
|
|
49167
|
-
if (["GITHUB_ACTIONS", "GITEA_ACTIONS", "CIRCLECI"].some((key) => (key in env2))) {
|
|
49168
|
-
return 3;
|
|
49169
|
-
}
|
|
49170
|
-
if (["TRAVIS", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign2) => (sign2 in env2)) || env2.CI_NAME === "codeship") {
|
|
49171
|
-
return 1;
|
|
49172
|
-
}
|
|
49173
|
-
return min;
|
|
49174
|
-
}
|
|
49175
|
-
if ("TEAMCITY_VERSION" in env2) {
|
|
49176
|
-
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env2.TEAMCITY_VERSION) ? 1 : 0;
|
|
49177
|
-
}
|
|
49178
|
-
if (env2.COLORTERM === "truecolor") {
|
|
49179
|
-
return 3;
|
|
49180
|
-
}
|
|
49181
|
-
if (env2.TERM === "xterm-kitty") {
|
|
49182
|
-
return 3;
|
|
49183
|
-
}
|
|
49184
|
-
if (env2.TERM === "xterm-ghostty") {
|
|
49185
|
-
return 3;
|
|
49186
|
-
}
|
|
49187
|
-
if (env2.TERM === "wezterm") {
|
|
49188
|
-
return 3;
|
|
49189
|
-
}
|
|
49190
|
-
if ("TERM_PROGRAM" in env2) {
|
|
49191
|
-
const version2 = Number.parseInt((env2.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
49192
|
-
switch (env2.TERM_PROGRAM) {
|
|
49193
|
-
case "iTerm.app": {
|
|
49194
|
-
return version2 >= 3 ? 3 : 2;
|
|
49195
|
-
}
|
|
49196
|
-
case "Apple_Terminal": {
|
|
49197
|
-
return 2;
|
|
49198
|
-
}
|
|
49199
|
-
}
|
|
49200
|
-
}
|
|
49201
|
-
if (/-256(color)?$/i.test(env2.TERM)) {
|
|
49202
|
-
return 2;
|
|
49203
|
-
}
|
|
49204
|
-
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env2.TERM)) {
|
|
49205
|
-
return 1;
|
|
49206
|
-
}
|
|
49207
|
-
if ("COLORTERM" in env2) {
|
|
49208
|
-
return 1;
|
|
49209
|
-
}
|
|
49210
|
-
return min;
|
|
49211
|
-
}
|
|
49212
|
-
function createSupportsColor(stream4, options = {}) {
|
|
49213
|
-
const level = _supportsColor(stream4, {
|
|
49214
|
-
streamIsTTY: stream4 && stream4.isTTY,
|
|
49215
|
-
...options
|
|
49216
|
-
});
|
|
49217
|
-
return translateLevel(level);
|
|
49218
|
-
}
|
|
49219
|
-
var env2, flagForceColor, supportsColor, supports_color_default;
|
|
49220
|
-
var init_supports_color = __esm(() => {
|
|
49221
|
-
({ env: env2 } = process12);
|
|
49222
|
-
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
|
|
49223
|
-
flagForceColor = 0;
|
|
49224
|
-
} else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
|
|
49225
|
-
flagForceColor = 1;
|
|
49226
|
-
}
|
|
49227
|
-
supportsColor = {
|
|
49228
|
-
stdout: createSupportsColor({ isTTY: tty3.isatty(1) }),
|
|
49229
|
-
stderr: createSupportsColor({ isTTY: tty3.isatty(2) })
|
|
49230
|
-
};
|
|
49231
|
-
supports_color_default = supportsColor;
|
|
49232
|
-
});
|
|
49233
|
-
|
|
49234
|
-
// node_modules/chalk/source/utilities.js
|
|
49235
|
-
function stringReplaceAll(string4, substring, replacer) {
|
|
49236
|
-
let index2 = string4.indexOf(substring);
|
|
49237
|
-
if (index2 === -1) {
|
|
49238
|
-
return string4;
|
|
49239
|
-
}
|
|
49240
|
-
const substringLength = substring.length;
|
|
49241
|
-
let endIndex = 0;
|
|
49242
|
-
let returnValue = "";
|
|
49243
|
-
do {
|
|
49244
|
-
returnValue += string4.slice(endIndex, index2) + substring + replacer;
|
|
49245
|
-
endIndex = index2 + substringLength;
|
|
49246
|
-
index2 = string4.indexOf(substring, endIndex);
|
|
49247
|
-
} while (index2 !== -1);
|
|
49248
|
-
returnValue += string4.slice(endIndex);
|
|
49249
|
-
return returnValue;
|
|
49250
|
-
}
|
|
49251
|
-
function stringEncaseCRLFWithFirstIndex(string4, prefix, postfix, index2) {
|
|
49252
|
-
let endIndex = 0;
|
|
49253
|
-
let returnValue = "";
|
|
49254
|
-
do {
|
|
49255
|
-
const gotCR = string4[index2 - 1] === "\r";
|
|
49256
|
-
returnValue += string4.slice(endIndex, gotCR ? index2 - 1 : index2) + prefix + (gotCR ? `\r
|
|
49257
|
-
` : `
|
|
49258
|
-
`) + postfix;
|
|
49259
|
-
endIndex = index2 + 1;
|
|
49260
|
-
index2 = string4.indexOf(`
|
|
49261
|
-
`, endIndex);
|
|
49262
|
-
} while (index2 !== -1);
|
|
49263
|
-
returnValue += string4.slice(endIndex);
|
|
49264
|
-
return returnValue;
|
|
49265
|
-
}
|
|
49266
|
-
|
|
49267
|
-
// node_modules/chalk/source/index.js
|
|
49268
|
-
class Chalk {
|
|
49269
|
-
constructor(options) {
|
|
49270
|
-
return chalkFactory(options);
|
|
49271
|
-
}
|
|
49272
|
-
}
|
|
49273
|
-
function createChalk(options) {
|
|
49274
|
-
return chalkFactory(options);
|
|
49275
|
-
}
|
|
49276
|
-
var stdoutColor, stderrColor, GENERATOR, STYLER, IS_EMPTY, levelMapping, styles2, applyOptions = (object2, options = {}) => {
|
|
49277
|
-
if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {
|
|
49278
|
-
throw new Error("The `level` option should be an integer from 0 to 3");
|
|
49279
|
-
}
|
|
49280
|
-
const colorLevel = stdoutColor ? stdoutColor.level : 0;
|
|
49281
|
-
object2.level = options.level === undefined ? colorLevel : options.level;
|
|
49282
|
-
}, chalkFactory = (options) => {
|
|
49283
|
-
const chalk = (...strings) => strings.join(" ");
|
|
49284
|
-
applyOptions(chalk, options);
|
|
49285
|
-
Object.setPrototypeOf(chalk, createChalk.prototype);
|
|
49286
|
-
return chalk;
|
|
49287
|
-
}, getModelAnsi = (model, level, type, ...arguments_) => {
|
|
49288
|
-
if (model === "rgb") {
|
|
49289
|
-
if (level === "ansi16m") {
|
|
49290
|
-
return ansi_styles_default[type].ansi16m(...arguments_);
|
|
49291
|
-
}
|
|
49292
|
-
if (level === "ansi256") {
|
|
49293
|
-
return ansi_styles_default[type].ansi256(ansi_styles_default.rgbToAnsi256(...arguments_));
|
|
49294
|
-
}
|
|
49295
|
-
return ansi_styles_default[type].ansi(ansi_styles_default.rgbToAnsi(...arguments_));
|
|
49296
|
-
}
|
|
49297
|
-
if (model === "hex") {
|
|
49298
|
-
return getModelAnsi("rgb", level, type, ...ansi_styles_default.hexToRgb(...arguments_));
|
|
49299
|
-
}
|
|
49300
|
-
return ansi_styles_default[type][model](...arguments_);
|
|
49301
|
-
}, usedModels, proto, createStyler = (open4, close, parent) => {
|
|
49302
|
-
let openAll;
|
|
49303
|
-
let closeAll;
|
|
49304
|
-
if (parent === undefined) {
|
|
49305
|
-
openAll = open4;
|
|
49306
|
-
closeAll = close;
|
|
49307
|
-
} else {
|
|
49308
|
-
openAll = parent.openAll + open4;
|
|
49309
|
-
closeAll = close + parent.closeAll;
|
|
49310
|
-
}
|
|
49311
|
-
return {
|
|
49312
|
-
open: open4,
|
|
49313
|
-
close,
|
|
49314
|
-
openAll,
|
|
49315
|
-
closeAll,
|
|
49316
|
-
parent
|
|
49317
|
-
};
|
|
49318
|
-
}, createBuilder = (self2, _styler, _isEmpty) => {
|
|
49319
|
-
const builder = (...arguments_) => applyStyle(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" "));
|
|
49320
|
-
Object.setPrototypeOf(builder, proto);
|
|
49321
|
-
builder[GENERATOR] = self2;
|
|
49322
|
-
builder[STYLER] = _styler;
|
|
49323
|
-
builder[IS_EMPTY] = _isEmpty;
|
|
49324
|
-
return builder;
|
|
49325
|
-
}, applyStyle = (self2, string4) => {
|
|
49326
|
-
if (self2.level <= 0 || !string4) {
|
|
49327
|
-
return self2[IS_EMPTY] ? "" : string4;
|
|
49328
|
-
}
|
|
49329
|
-
let styler = self2[STYLER];
|
|
49330
|
-
if (styler === undefined) {
|
|
49331
|
-
return string4;
|
|
49332
|
-
}
|
|
49333
|
-
const { openAll, closeAll } = styler;
|
|
49334
|
-
if (string4.includes("\x1B")) {
|
|
49335
|
-
while (styler !== undefined) {
|
|
49336
|
-
string4 = stringReplaceAll(string4, styler.close, styler.open);
|
|
49337
|
-
styler = styler.parent;
|
|
49338
|
-
}
|
|
49339
|
-
}
|
|
49340
|
-
const lfIndex = string4.indexOf(`
|
|
49341
|
-
`);
|
|
49342
|
-
if (lfIndex !== -1) {
|
|
49343
|
-
string4 = stringEncaseCRLFWithFirstIndex(string4, closeAll, openAll, lfIndex);
|
|
49344
|
-
}
|
|
49345
|
-
return openAll + string4 + closeAll;
|
|
49346
|
-
}, chalk, chalkStderr, source_default;
|
|
49347
|
-
var init_source2 = __esm(() => {
|
|
49348
|
-
init_ansi_styles();
|
|
49349
|
-
init_supports_color();
|
|
49350
|
-
({ stdout: stdoutColor, stderr: stderrColor } = supports_color_default);
|
|
49351
|
-
GENERATOR = Symbol("GENERATOR");
|
|
49352
|
-
STYLER = Symbol("STYLER");
|
|
49353
|
-
IS_EMPTY = Symbol("IS_EMPTY");
|
|
49354
|
-
levelMapping = [
|
|
49355
|
-
"ansi",
|
|
49356
|
-
"ansi",
|
|
49357
|
-
"ansi256",
|
|
49358
|
-
"ansi16m"
|
|
49359
|
-
];
|
|
49360
|
-
styles2 = Object.create(null);
|
|
49361
|
-
Object.setPrototypeOf(createChalk.prototype, Function.prototype);
|
|
49362
|
-
for (const [styleName, style] of Object.entries(ansi_styles_default)) {
|
|
49363
|
-
styles2[styleName] = {
|
|
49364
|
-
get() {
|
|
49365
|
-
const builder = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]);
|
|
49366
|
-
Object.defineProperty(this, styleName, { value: builder });
|
|
49367
|
-
return builder;
|
|
49368
|
-
}
|
|
49369
|
-
};
|
|
49370
|
-
}
|
|
49371
|
-
styles2.visible = {
|
|
49372
|
-
get() {
|
|
49373
|
-
const builder = createBuilder(this, this[STYLER], true);
|
|
49374
|
-
Object.defineProperty(this, "visible", { value: builder });
|
|
49375
|
-
return builder;
|
|
49376
|
-
}
|
|
49377
|
-
};
|
|
49378
|
-
usedModels = ["rgb", "hex", "ansi256"];
|
|
49379
|
-
for (const model of usedModels) {
|
|
49380
|
-
styles2[model] = {
|
|
49381
|
-
get() {
|
|
49382
|
-
const { level } = this;
|
|
49383
|
-
return function(...arguments_) {
|
|
49384
|
-
const styler = createStyler(getModelAnsi(model, levelMapping[level], "color", ...arguments_), ansi_styles_default.color.close, this[STYLER]);
|
|
49385
|
-
return createBuilder(this, styler, this[IS_EMPTY]);
|
|
49386
|
-
};
|
|
49387
|
-
}
|
|
49388
|
-
};
|
|
49389
|
-
const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
|
|
49390
|
-
styles2[bgModel] = {
|
|
49391
|
-
get() {
|
|
49392
|
-
const { level } = this;
|
|
49393
|
-
return function(...arguments_) {
|
|
49394
|
-
const styler = createStyler(getModelAnsi(model, levelMapping[level], "bgColor", ...arguments_), ansi_styles_default.bgColor.close, this[STYLER]);
|
|
49395
|
-
return createBuilder(this, styler, this[IS_EMPTY]);
|
|
49396
|
-
};
|
|
49397
|
-
}
|
|
49398
|
-
};
|
|
49399
|
-
}
|
|
49400
|
-
proto = Object.defineProperties(() => {}, {
|
|
49401
|
-
...styles2,
|
|
49402
|
-
level: {
|
|
49403
|
-
enumerable: true,
|
|
49404
|
-
get() {
|
|
49405
|
-
return this[GENERATOR].level;
|
|
49406
|
-
},
|
|
49407
|
-
set(level) {
|
|
49408
|
-
this[GENERATOR].level = level;
|
|
49409
|
-
}
|
|
49410
|
-
}
|
|
49411
|
-
});
|
|
49412
|
-
Object.defineProperties(createChalk.prototype, styles2);
|
|
49413
|
-
chalk = createChalk();
|
|
49414
|
-
chalkStderr = createChalk({ level: stderrColor ? stderrColor.level : 0 });
|
|
49415
|
-
source_default = chalk;
|
|
49416
|
-
});
|
|
49417
|
-
|
|
49418
|
-
// src/utils/sequential.ts
|
|
49419
|
-
function sequential(fn) {
|
|
49420
|
-
const queue = [];
|
|
49421
|
-
let processing = false;
|
|
49422
|
-
async function processQueue() {
|
|
49423
|
-
if (processing)
|
|
49424
|
-
return;
|
|
49425
|
-
if (queue.length === 0)
|
|
49426
|
-
return;
|
|
49427
|
-
processing = true;
|
|
49428
|
-
while (queue.length > 0) {
|
|
49429
|
-
const { args, resolve: resolve5, reject, context } = queue.shift();
|
|
49430
|
-
try {
|
|
49431
|
-
const result = await fn.apply(context, args);
|
|
49432
|
-
resolve5(result);
|
|
49433
|
-
} catch (error40) {
|
|
49434
|
-
reject(error40);
|
|
49435
|
-
}
|
|
49436
|
-
}
|
|
49437
|
-
processing = false;
|
|
49438
|
-
if (queue.length > 0) {
|
|
49439
|
-
processQueue();
|
|
49440
|
-
}
|
|
49441
|
-
}
|
|
49442
|
-
return function(...args) {
|
|
49443
|
-
return new Promise((resolve5, reject) => {
|
|
49444
|
-
queue.push({ args, resolve: resolve5, reject, context: this });
|
|
49445
|
-
processQueue();
|
|
49446
|
-
});
|
|
49447
|
-
};
|
|
49448
|
-
}
|
|
49449
|
-
|
|
49450
48875
|
// node_modules/lodash-es/_assignMergeValue.js
|
|
49451
48876
|
function assignMergeValue(object2, key, value) {
|
|
49452
48877
|
if (value !== undefined && !eq_default(object2[key], value) || value === undefined && !(key in object2)) {
|
|
@@ -49502,11 +48927,11 @@ function isPlainObject4(value) {
|
|
|
49502
48927
|
if (!isObjectLike_default(value) || _baseGetTag_default(value) != objectTag5) {
|
|
49503
48928
|
return false;
|
|
49504
48929
|
}
|
|
49505
|
-
var
|
|
49506
|
-
if (
|
|
48930
|
+
var proto = _getPrototype_default(value);
|
|
48931
|
+
if (proto === null) {
|
|
49507
48932
|
return true;
|
|
49508
48933
|
}
|
|
49509
|
-
var Ctor = hasOwnProperty14.call(
|
|
48934
|
+
var Ctor = hasOwnProperty14.call(proto, "constructor") && proto.constructor;
|
|
49510
48935
|
return typeof Ctor == "function" && Ctor instanceof Ctor && funcToString3.call(Ctor) == objectCtorString;
|
|
49511
48936
|
}
|
|
49512
48937
|
var objectTag5 = "[object Object]", funcProto3, objectProto16, funcToString3, hasOwnProperty14, objectCtorString, isPlainObject_default;
|
|
@@ -51325,9 +50750,9 @@ function getHostPlatformForAnalytics() {
|
|
|
51325
50750
|
if (override === "win32" || override === "darwin" || override === "linux") {
|
|
51326
50751
|
return override;
|
|
51327
50752
|
}
|
|
51328
|
-
return
|
|
50753
|
+
return env2.platform;
|
|
51329
50754
|
}
|
|
51330
|
-
var getGlobalURFile, hasInternetAccess, detectPackageManagers, detectRuntimes, isWslEnvironment, isNpmFromWindowsPath, JETBRAINS_IDES, detectDeploymentEnvironment,
|
|
50755
|
+
var getGlobalURFile, hasInternetAccess, detectPackageManagers, detectRuntimes, isWslEnvironment, isNpmFromWindowsPath, JETBRAINS_IDES, detectDeploymentEnvironment, env2;
|
|
51331
50756
|
var init_env = __esm(() => {
|
|
51332
50757
|
init_memoize();
|
|
51333
50758
|
init_oauth();
|
|
@@ -51475,15 +50900,15 @@ var init_env = __esm(() => {
|
|
|
51475
50900
|
if (getFsImplementation().existsSync("/.dockerenv"))
|
|
51476
50901
|
return "docker";
|
|
51477
50902
|
} catch {}
|
|
51478
|
-
if (
|
|
50903
|
+
if (env2.platform === "darwin")
|
|
51479
50904
|
return "unknown-darwin";
|
|
51480
|
-
if (
|
|
50905
|
+
if (env2.platform === "linux")
|
|
51481
50906
|
return "unknown-linux";
|
|
51482
|
-
if (
|
|
50907
|
+
if (env2.platform === "win32")
|
|
51483
50908
|
return "unknown-win32";
|
|
51484
50909
|
return "unknown";
|
|
51485
50910
|
});
|
|
51486
|
-
|
|
50911
|
+
env2 = {
|
|
51487
50912
|
hasInternetAccess,
|
|
51488
50913
|
isCI: isEnvTruthy(process.env.CI),
|
|
51489
50914
|
platform: ["win32", "darwin"].includes(process.platform) ? process.platform : "linux",
|
|
@@ -51505,7 +50930,7 @@ var init_env = __esm(() => {
|
|
|
51505
50930
|
var BLACK_CIRCLE, UR_HOUSE = "\u2302", UP_ARROW = "\u2191", DOWN_ARROW = "\u2193", LIGHTNING_BOLT = "\u21AF", EFFORT_LOW = "\u25CB", EFFORT_MEDIUM = "\u25D0", EFFORT_HIGH = "\u25CF", EFFORT_MAX = "\u25C9", PAUSE_ICON = "\u23F8", REFRESH_ARROW = "\u21BB", DIAMOND_OPEN = "\u25C7", DIAMOND_FILLED = "\u25C6", REFERENCE_MARK = "\u203B", BLOCKQUOTE_BAR = "\u258E", BRIDGE_READY_INDICATOR = "\xB7\u2714\uFE0E\xB7", BRIDGE_FAILED_INDICATOR = "\xD7";
|
|
51506
50931
|
var init_figures2 = __esm(() => {
|
|
51507
50932
|
init_env();
|
|
51508
|
-
BLACK_CIRCLE =
|
|
50933
|
+
BLACK_CIRCLE = env2.platform === "darwin" ? "\u23FA" : "\u25CF";
|
|
51509
50934
|
});
|
|
51510
50935
|
|
|
51511
50936
|
// src/types/permissions.ts
|
|
@@ -52926,6 +52351,10 @@ var init_types3 = __esm(() => {
|
|
|
52926
52351
|
autoMemoryEnabled: exports_external.boolean().optional().describe("Enable auto-memory for this project. When false, UR will not read from or write to the auto-memory directory."),
|
|
52927
52352
|
autoMemoryDirectory: exports_external.string().optional().describe("Custom directory path for auto-memory storage. Supports ~/ prefix for home directory expansion. Ignored if set in projectSettings (checked-in .ur/settings.json) for security. When unset, defaults to ~/.ur/projects/<sanitized-cwd>/memory/."),
|
|
52928
52353
|
autoDreamEnabled: exports_external.boolean().optional().describe("Enable background memory consolidation (auto-dream). When set, overrides the server-side default."),
|
|
52354
|
+
ollama: exports_external.object({
|
|
52355
|
+
host: exports_external.string().optional().describe("URL of the Ollama server to use (e.g. http://192.168.1.50:11434)"),
|
|
52356
|
+
lanDiscovery: exports_external.boolean().optional().describe("When true, UR asks to discover Ollama servers on the local network at startup")
|
|
52357
|
+
}).optional().describe("Ollama backend configuration"),
|
|
52929
52358
|
showThinkingSummaries: exports_external.boolean().optional().describe("Show thinking summaries in the transcript view (ctrl+o). Default: false."),
|
|
52930
52359
|
skipDangerousModePermissionPrompt: exports_external.boolean().optional().describe("Whether the user has accepted the bypass permissions mode dialog"),
|
|
52931
52360
|
...{},
|
|
@@ -53962,6 +53391,610 @@ var init_settings2 = __esm(() => {
|
|
|
53962
53391
|
getSettings_DEPRECATED = getInitialSettings;
|
|
53963
53392
|
});
|
|
53964
53393
|
|
|
53394
|
+
// src/utils/model/ollamaConfig.ts
|
|
53395
|
+
function normalizeOllamaBaseUrl(value) {
|
|
53396
|
+
const base2 = value?.trim() || "http://localhost:11434";
|
|
53397
|
+
const withScheme = /^https?:\/\//.test(base2) ? base2 : `http://${base2}`;
|
|
53398
|
+
return withScheme.replace(/\/api\/?$/, "").replace(/\/$/, "");
|
|
53399
|
+
}
|
|
53400
|
+
function getOllamaBaseUrl(env3 = process.env, settings) {
|
|
53401
|
+
if (sessionOverride) {
|
|
53402
|
+
return normalizeOllamaBaseUrl(sessionOverride);
|
|
53403
|
+
}
|
|
53404
|
+
const envHost = env3.OLLAMA_HOST || env3.OLLAMA_BASE_URL;
|
|
53405
|
+
if (envHost) {
|
|
53406
|
+
return normalizeOllamaBaseUrl(envHost);
|
|
53407
|
+
}
|
|
53408
|
+
const settingsHost = settings === undefined ? getSettingsForSource("userSettings")?.ollama?.host : settings.ollama?.host;
|
|
53409
|
+
if (settingsHost) {
|
|
53410
|
+
return normalizeOllamaBaseUrl(settingsHost);
|
|
53411
|
+
}
|
|
53412
|
+
return "http://localhost:11434";
|
|
53413
|
+
}
|
|
53414
|
+
function setOllamaBaseUrlOverride(url3) {
|
|
53415
|
+
sessionOverride = url3;
|
|
53416
|
+
}
|
|
53417
|
+
var sessionOverride;
|
|
53418
|
+
var init_ollamaConfig = __esm(() => {
|
|
53419
|
+
init_settings2();
|
|
53420
|
+
});
|
|
53421
|
+
|
|
53422
|
+
// src/constants/oauth.ts
|
|
53423
|
+
var exports_oauth = {};
|
|
53424
|
+
__export(exports_oauth, {
|
|
53425
|
+
getOauthConfig: () => getOauthConfig,
|
|
53426
|
+
fileSuffixForOauthConfig: () => fileSuffixForOauthConfig,
|
|
53427
|
+
UR_AI_PROFILE_SCOPE: () => UR_AI_PROFILE_SCOPE,
|
|
53428
|
+
UR_AI_OAUTH_SCOPES: () => UR_AI_OAUTH_SCOPES,
|
|
53429
|
+
UR_AI_INFERENCE_SCOPE: () => UR_AI_INFERENCE_SCOPE,
|
|
53430
|
+
OAUTH_BETA_HEADER: () => OAUTH_BETA_HEADER,
|
|
53431
|
+
MCP_CLIENT_METADATA_URL: () => MCP_CLIENT_METADATA_URL,
|
|
53432
|
+
CONSOLE_OAUTH_SCOPES: () => CONSOLE_OAUTH_SCOPES,
|
|
53433
|
+
ALL_OAUTH_SCOPES: () => ALL_OAUTH_SCOPES
|
|
53434
|
+
});
|
|
53435
|
+
function fileSuffixForOauthConfig() {
|
|
53436
|
+
return "";
|
|
53437
|
+
}
|
|
53438
|
+
function getOauthConfig() {
|
|
53439
|
+
return {
|
|
53440
|
+
BASE_API_URL: getOllamaBaseUrl(),
|
|
53441
|
+
UR_AI_ORIGIN: "",
|
|
53442
|
+
UR_AI_AUTHORIZE_URL: "",
|
|
53443
|
+
CONSOLE_AUTHORIZE_URL: "",
|
|
53444
|
+
CLIENT_ID: "",
|
|
53445
|
+
MANUAL_REDIRECT_URL: "",
|
|
53446
|
+
TOKEN_URL: "",
|
|
53447
|
+
URAI_SUCCESS_URL: "",
|
|
53448
|
+
CONSOLE_SUCCESS_URL: "",
|
|
53449
|
+
ROLES_URL: "",
|
|
53450
|
+
API_KEY_URL: "",
|
|
53451
|
+
OAUTH_FILE_SUFFIX: ""
|
|
53452
|
+
};
|
|
53453
|
+
}
|
|
53454
|
+
var UR_AI_INFERENCE_SCOPE = "user:inference", UR_AI_PROFILE_SCOPE = "user:profile", CONSOLE_SCOPE = "org:create_api_key", OAUTH_BETA_HEADER = "oauth-2025-04-20", CONSOLE_OAUTH_SCOPES, UR_AI_OAUTH_SCOPES, ALL_OAUTH_SCOPES, MCP_CLIENT_METADATA_URL = "";
|
|
53455
|
+
var init_oauth = __esm(() => {
|
|
53456
|
+
init_envUtils();
|
|
53457
|
+
init_ollamaConfig();
|
|
53458
|
+
CONSOLE_OAUTH_SCOPES = [
|
|
53459
|
+
CONSOLE_SCOPE,
|
|
53460
|
+
UR_AI_PROFILE_SCOPE
|
|
53461
|
+
];
|
|
53462
|
+
UR_AI_OAUTH_SCOPES = [
|
|
53463
|
+
UR_AI_PROFILE_SCOPE,
|
|
53464
|
+
UR_AI_INFERENCE_SCOPE,
|
|
53465
|
+
"user:sessions:ur",
|
|
53466
|
+
"user:mcp_servers",
|
|
53467
|
+
"user:file_upload"
|
|
53468
|
+
];
|
|
53469
|
+
ALL_OAUTH_SCOPES = Array.from(new Set([...CONSOLE_OAUTH_SCOPES, ...UR_AI_OAUTH_SCOPES]));
|
|
53470
|
+
});
|
|
53471
|
+
|
|
53472
|
+
// node_modules/chalk/source/vendor/ansi-styles/index.js
|
|
53473
|
+
function assembleStyles() {
|
|
53474
|
+
const codes = new Map;
|
|
53475
|
+
for (const [groupName, group] of Object.entries(styles)) {
|
|
53476
|
+
for (const [styleName, style] of Object.entries(group)) {
|
|
53477
|
+
styles[styleName] = {
|
|
53478
|
+
open: `\x1B[${style[0]}m`,
|
|
53479
|
+
close: `\x1B[${style[1]}m`
|
|
53480
|
+
};
|
|
53481
|
+
group[styleName] = styles[styleName];
|
|
53482
|
+
codes.set(style[0], style[1]);
|
|
53483
|
+
}
|
|
53484
|
+
Object.defineProperty(styles, groupName, {
|
|
53485
|
+
value: group,
|
|
53486
|
+
enumerable: false
|
|
53487
|
+
});
|
|
53488
|
+
}
|
|
53489
|
+
Object.defineProperty(styles, "codes", {
|
|
53490
|
+
value: codes,
|
|
53491
|
+
enumerable: false
|
|
53492
|
+
});
|
|
53493
|
+
styles.color.close = "\x1B[39m";
|
|
53494
|
+
styles.bgColor.close = "\x1B[49m";
|
|
53495
|
+
styles.color.ansi = wrapAnsi16();
|
|
53496
|
+
styles.color.ansi256 = wrapAnsi256();
|
|
53497
|
+
styles.color.ansi16m = wrapAnsi16m();
|
|
53498
|
+
styles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
|
|
53499
|
+
styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
|
|
53500
|
+
styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
|
|
53501
|
+
Object.defineProperties(styles, {
|
|
53502
|
+
rgbToAnsi256: {
|
|
53503
|
+
value(red2, green2, blue2) {
|
|
53504
|
+
if (red2 === green2 && green2 === blue2) {
|
|
53505
|
+
if (red2 < 8) {
|
|
53506
|
+
return 16;
|
|
53507
|
+
}
|
|
53508
|
+
if (red2 > 248) {
|
|
53509
|
+
return 231;
|
|
53510
|
+
}
|
|
53511
|
+
return Math.round((red2 - 8) / 247 * 24) + 232;
|
|
53512
|
+
}
|
|
53513
|
+
return 16 + 36 * Math.round(red2 / 255 * 5) + 6 * Math.round(green2 / 255 * 5) + Math.round(blue2 / 255 * 5);
|
|
53514
|
+
},
|
|
53515
|
+
enumerable: false
|
|
53516
|
+
},
|
|
53517
|
+
hexToRgb: {
|
|
53518
|
+
value(hex) {
|
|
53519
|
+
const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
|
|
53520
|
+
if (!matches) {
|
|
53521
|
+
return [0, 0, 0];
|
|
53522
|
+
}
|
|
53523
|
+
let [colorString] = matches;
|
|
53524
|
+
if (colorString.length === 3) {
|
|
53525
|
+
colorString = [...colorString].map((character) => character + character).join("");
|
|
53526
|
+
}
|
|
53527
|
+
const integer2 = Number.parseInt(colorString, 16);
|
|
53528
|
+
return [
|
|
53529
|
+
integer2 >> 16 & 255,
|
|
53530
|
+
integer2 >> 8 & 255,
|
|
53531
|
+
integer2 & 255
|
|
53532
|
+
];
|
|
53533
|
+
},
|
|
53534
|
+
enumerable: false
|
|
53535
|
+
},
|
|
53536
|
+
hexToAnsi256: {
|
|
53537
|
+
value: (hex) => styles.rgbToAnsi256(...styles.hexToRgb(hex)),
|
|
53538
|
+
enumerable: false
|
|
53539
|
+
},
|
|
53540
|
+
ansi256ToAnsi: {
|
|
53541
|
+
value(code) {
|
|
53542
|
+
if (code < 8) {
|
|
53543
|
+
return 30 + code;
|
|
53544
|
+
}
|
|
53545
|
+
if (code < 16) {
|
|
53546
|
+
return 90 + (code - 8);
|
|
53547
|
+
}
|
|
53548
|
+
let red2;
|
|
53549
|
+
let green2;
|
|
53550
|
+
let blue2;
|
|
53551
|
+
if (code >= 232) {
|
|
53552
|
+
red2 = ((code - 232) * 10 + 8) / 255;
|
|
53553
|
+
green2 = red2;
|
|
53554
|
+
blue2 = red2;
|
|
53555
|
+
} else {
|
|
53556
|
+
code -= 16;
|
|
53557
|
+
const remainder = code % 36;
|
|
53558
|
+
red2 = Math.floor(code / 36) / 5;
|
|
53559
|
+
green2 = Math.floor(remainder / 6) / 5;
|
|
53560
|
+
blue2 = remainder % 6 / 5;
|
|
53561
|
+
}
|
|
53562
|
+
const value = Math.max(red2, green2, blue2) * 2;
|
|
53563
|
+
if (value === 0) {
|
|
53564
|
+
return 30;
|
|
53565
|
+
}
|
|
53566
|
+
let result = 30 + (Math.round(blue2) << 2 | Math.round(green2) << 1 | Math.round(red2));
|
|
53567
|
+
if (value === 2) {
|
|
53568
|
+
result += 60;
|
|
53569
|
+
}
|
|
53570
|
+
return result;
|
|
53571
|
+
},
|
|
53572
|
+
enumerable: false
|
|
53573
|
+
},
|
|
53574
|
+
rgbToAnsi: {
|
|
53575
|
+
value: (red2, green2, blue2) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red2, green2, blue2)),
|
|
53576
|
+
enumerable: false
|
|
53577
|
+
},
|
|
53578
|
+
hexToAnsi: {
|
|
53579
|
+
value: (hex) => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)),
|
|
53580
|
+
enumerable: false
|
|
53581
|
+
}
|
|
53582
|
+
});
|
|
53583
|
+
return styles;
|
|
53584
|
+
}
|
|
53585
|
+
var ANSI_BACKGROUND_OFFSET = 10, wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`, wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`, wrapAnsi16m = (offset = 0) => (red2, green2, blue2) => `\x1B[${38 + offset};2;${red2};${green2};${blue2}m`, styles, modifierNames, foregroundColorNames, backgroundColorNames, colorNames, ansiStyles, ansi_styles_default;
|
|
53586
|
+
var init_ansi_styles = __esm(() => {
|
|
53587
|
+
styles = {
|
|
53588
|
+
modifier: {
|
|
53589
|
+
reset: [0, 0],
|
|
53590
|
+
bold: [1, 22],
|
|
53591
|
+
dim: [2, 22],
|
|
53592
|
+
italic: [3, 23],
|
|
53593
|
+
underline: [4, 24],
|
|
53594
|
+
overline: [53, 55],
|
|
53595
|
+
inverse: [7, 27],
|
|
53596
|
+
hidden: [8, 28],
|
|
53597
|
+
strikethrough: [9, 29]
|
|
53598
|
+
},
|
|
53599
|
+
color: {
|
|
53600
|
+
black: [30, 39],
|
|
53601
|
+
red: [31, 39],
|
|
53602
|
+
green: [32, 39],
|
|
53603
|
+
yellow: [33, 39],
|
|
53604
|
+
blue: [34, 39],
|
|
53605
|
+
magenta: [35, 39],
|
|
53606
|
+
cyan: [36, 39],
|
|
53607
|
+
white: [37, 39],
|
|
53608
|
+
blackBright: [90, 39],
|
|
53609
|
+
gray: [90, 39],
|
|
53610
|
+
grey: [90, 39],
|
|
53611
|
+
redBright: [91, 39],
|
|
53612
|
+
greenBright: [92, 39],
|
|
53613
|
+
yellowBright: [93, 39],
|
|
53614
|
+
blueBright: [94, 39],
|
|
53615
|
+
magentaBright: [95, 39],
|
|
53616
|
+
cyanBright: [96, 39],
|
|
53617
|
+
whiteBright: [97, 39]
|
|
53618
|
+
},
|
|
53619
|
+
bgColor: {
|
|
53620
|
+
bgBlack: [40, 49],
|
|
53621
|
+
bgRed: [41, 49],
|
|
53622
|
+
bgGreen: [42, 49],
|
|
53623
|
+
bgYellow: [43, 49],
|
|
53624
|
+
bgBlue: [44, 49],
|
|
53625
|
+
bgMagenta: [45, 49],
|
|
53626
|
+
bgCyan: [46, 49],
|
|
53627
|
+
bgWhite: [47, 49],
|
|
53628
|
+
bgBlackBright: [100, 49],
|
|
53629
|
+
bgGray: [100, 49],
|
|
53630
|
+
bgGrey: [100, 49],
|
|
53631
|
+
bgRedBright: [101, 49],
|
|
53632
|
+
bgGreenBright: [102, 49],
|
|
53633
|
+
bgYellowBright: [103, 49],
|
|
53634
|
+
bgBlueBright: [104, 49],
|
|
53635
|
+
bgMagentaBright: [105, 49],
|
|
53636
|
+
bgCyanBright: [106, 49],
|
|
53637
|
+
bgWhiteBright: [107, 49]
|
|
53638
|
+
}
|
|
53639
|
+
};
|
|
53640
|
+
modifierNames = Object.keys(styles.modifier);
|
|
53641
|
+
foregroundColorNames = Object.keys(styles.color);
|
|
53642
|
+
backgroundColorNames = Object.keys(styles.bgColor);
|
|
53643
|
+
colorNames = [...foregroundColorNames, ...backgroundColorNames];
|
|
53644
|
+
ansiStyles = assembleStyles();
|
|
53645
|
+
ansi_styles_default = ansiStyles;
|
|
53646
|
+
});
|
|
53647
|
+
|
|
53648
|
+
// node_modules/chalk/source/vendor/supports-color/index.js
|
|
53649
|
+
import process12 from "process";
|
|
53650
|
+
import os2 from "os";
|
|
53651
|
+
import tty3 from "tty";
|
|
53652
|
+
function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : process12.argv) {
|
|
53653
|
+
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
53654
|
+
const position2 = argv.indexOf(prefix + flag);
|
|
53655
|
+
const terminatorPosition = argv.indexOf("--");
|
|
53656
|
+
return position2 !== -1 && (terminatorPosition === -1 || position2 < terminatorPosition);
|
|
53657
|
+
}
|
|
53658
|
+
function envForceColor() {
|
|
53659
|
+
if ("FORCE_COLOR" in env3) {
|
|
53660
|
+
if (env3.FORCE_COLOR === "true") {
|
|
53661
|
+
return 1;
|
|
53662
|
+
}
|
|
53663
|
+
if (env3.FORCE_COLOR === "false") {
|
|
53664
|
+
return 0;
|
|
53665
|
+
}
|
|
53666
|
+
return env3.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env3.FORCE_COLOR, 10), 3);
|
|
53667
|
+
}
|
|
53668
|
+
}
|
|
53669
|
+
function translateLevel(level) {
|
|
53670
|
+
if (level === 0) {
|
|
53671
|
+
return false;
|
|
53672
|
+
}
|
|
53673
|
+
return {
|
|
53674
|
+
level,
|
|
53675
|
+
hasBasic: true,
|
|
53676
|
+
has256: level >= 2,
|
|
53677
|
+
has16m: level >= 3
|
|
53678
|
+
};
|
|
53679
|
+
}
|
|
53680
|
+
function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
53681
|
+
const noFlagForceColor = envForceColor();
|
|
53682
|
+
if (noFlagForceColor !== undefined) {
|
|
53683
|
+
flagForceColor = noFlagForceColor;
|
|
53684
|
+
}
|
|
53685
|
+
const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
|
|
53686
|
+
if (forceColor === 0) {
|
|
53687
|
+
return 0;
|
|
53688
|
+
}
|
|
53689
|
+
if (sniffFlags) {
|
|
53690
|
+
if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
|
|
53691
|
+
return 3;
|
|
53692
|
+
}
|
|
53693
|
+
if (hasFlag("color=256")) {
|
|
53694
|
+
return 2;
|
|
53695
|
+
}
|
|
53696
|
+
}
|
|
53697
|
+
if ("TF_BUILD" in env3 && "AGENT_NAME" in env3) {
|
|
53698
|
+
return 1;
|
|
53699
|
+
}
|
|
53700
|
+
if (haveStream && !streamIsTTY && forceColor === undefined) {
|
|
53701
|
+
return 0;
|
|
53702
|
+
}
|
|
53703
|
+
const min = forceColor || 0;
|
|
53704
|
+
if (env3.TERM === "dumb") {
|
|
53705
|
+
return min;
|
|
53706
|
+
}
|
|
53707
|
+
if (process12.platform === "win32") {
|
|
53708
|
+
const osRelease2 = os2.release().split(".");
|
|
53709
|
+
if (Number(osRelease2[0]) >= 10 && Number(osRelease2[2]) >= 10586) {
|
|
53710
|
+
return Number(osRelease2[2]) >= 14931 ? 3 : 2;
|
|
53711
|
+
}
|
|
53712
|
+
return 1;
|
|
53713
|
+
}
|
|
53714
|
+
if ("CI" in env3) {
|
|
53715
|
+
if (["GITHUB_ACTIONS", "GITEA_ACTIONS", "CIRCLECI"].some((key) => (key in env3))) {
|
|
53716
|
+
return 3;
|
|
53717
|
+
}
|
|
53718
|
+
if (["TRAVIS", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign2) => (sign2 in env3)) || env3.CI_NAME === "codeship") {
|
|
53719
|
+
return 1;
|
|
53720
|
+
}
|
|
53721
|
+
return min;
|
|
53722
|
+
}
|
|
53723
|
+
if ("TEAMCITY_VERSION" in env3) {
|
|
53724
|
+
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env3.TEAMCITY_VERSION) ? 1 : 0;
|
|
53725
|
+
}
|
|
53726
|
+
if (env3.COLORTERM === "truecolor") {
|
|
53727
|
+
return 3;
|
|
53728
|
+
}
|
|
53729
|
+
if (env3.TERM === "xterm-kitty") {
|
|
53730
|
+
return 3;
|
|
53731
|
+
}
|
|
53732
|
+
if (env3.TERM === "xterm-ghostty") {
|
|
53733
|
+
return 3;
|
|
53734
|
+
}
|
|
53735
|
+
if (env3.TERM === "wezterm") {
|
|
53736
|
+
return 3;
|
|
53737
|
+
}
|
|
53738
|
+
if ("TERM_PROGRAM" in env3) {
|
|
53739
|
+
const version2 = Number.parseInt((env3.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
53740
|
+
switch (env3.TERM_PROGRAM) {
|
|
53741
|
+
case "iTerm.app": {
|
|
53742
|
+
return version2 >= 3 ? 3 : 2;
|
|
53743
|
+
}
|
|
53744
|
+
case "Apple_Terminal": {
|
|
53745
|
+
return 2;
|
|
53746
|
+
}
|
|
53747
|
+
}
|
|
53748
|
+
}
|
|
53749
|
+
if (/-256(color)?$/i.test(env3.TERM)) {
|
|
53750
|
+
return 2;
|
|
53751
|
+
}
|
|
53752
|
+
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env3.TERM)) {
|
|
53753
|
+
return 1;
|
|
53754
|
+
}
|
|
53755
|
+
if ("COLORTERM" in env3) {
|
|
53756
|
+
return 1;
|
|
53757
|
+
}
|
|
53758
|
+
return min;
|
|
53759
|
+
}
|
|
53760
|
+
function createSupportsColor(stream4, options = {}) {
|
|
53761
|
+
const level = _supportsColor(stream4, {
|
|
53762
|
+
streamIsTTY: stream4 && stream4.isTTY,
|
|
53763
|
+
...options
|
|
53764
|
+
});
|
|
53765
|
+
return translateLevel(level);
|
|
53766
|
+
}
|
|
53767
|
+
var env3, flagForceColor, supportsColor, supports_color_default;
|
|
53768
|
+
var init_supports_color = __esm(() => {
|
|
53769
|
+
({ env: env3 } = process12);
|
|
53770
|
+
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
|
|
53771
|
+
flagForceColor = 0;
|
|
53772
|
+
} else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
|
|
53773
|
+
flagForceColor = 1;
|
|
53774
|
+
}
|
|
53775
|
+
supportsColor = {
|
|
53776
|
+
stdout: createSupportsColor({ isTTY: tty3.isatty(1) }),
|
|
53777
|
+
stderr: createSupportsColor({ isTTY: tty3.isatty(2) })
|
|
53778
|
+
};
|
|
53779
|
+
supports_color_default = supportsColor;
|
|
53780
|
+
});
|
|
53781
|
+
|
|
53782
|
+
// node_modules/chalk/source/utilities.js
|
|
53783
|
+
function stringReplaceAll(string4, substring, replacer) {
|
|
53784
|
+
let index2 = string4.indexOf(substring);
|
|
53785
|
+
if (index2 === -1) {
|
|
53786
|
+
return string4;
|
|
53787
|
+
}
|
|
53788
|
+
const substringLength = substring.length;
|
|
53789
|
+
let endIndex = 0;
|
|
53790
|
+
let returnValue = "";
|
|
53791
|
+
do {
|
|
53792
|
+
returnValue += string4.slice(endIndex, index2) + substring + replacer;
|
|
53793
|
+
endIndex = index2 + substringLength;
|
|
53794
|
+
index2 = string4.indexOf(substring, endIndex);
|
|
53795
|
+
} while (index2 !== -1);
|
|
53796
|
+
returnValue += string4.slice(endIndex);
|
|
53797
|
+
return returnValue;
|
|
53798
|
+
}
|
|
53799
|
+
function stringEncaseCRLFWithFirstIndex(string4, prefix, postfix, index2) {
|
|
53800
|
+
let endIndex = 0;
|
|
53801
|
+
let returnValue = "";
|
|
53802
|
+
do {
|
|
53803
|
+
const gotCR = string4[index2 - 1] === "\r";
|
|
53804
|
+
returnValue += string4.slice(endIndex, gotCR ? index2 - 1 : index2) + prefix + (gotCR ? `\r
|
|
53805
|
+
` : `
|
|
53806
|
+
`) + postfix;
|
|
53807
|
+
endIndex = index2 + 1;
|
|
53808
|
+
index2 = string4.indexOf(`
|
|
53809
|
+
`, endIndex);
|
|
53810
|
+
} while (index2 !== -1);
|
|
53811
|
+
returnValue += string4.slice(endIndex);
|
|
53812
|
+
return returnValue;
|
|
53813
|
+
}
|
|
53814
|
+
|
|
53815
|
+
// node_modules/chalk/source/index.js
|
|
53816
|
+
class Chalk {
|
|
53817
|
+
constructor(options) {
|
|
53818
|
+
return chalkFactory(options);
|
|
53819
|
+
}
|
|
53820
|
+
}
|
|
53821
|
+
function createChalk(options) {
|
|
53822
|
+
return chalkFactory(options);
|
|
53823
|
+
}
|
|
53824
|
+
var stdoutColor, stderrColor, GENERATOR, STYLER, IS_EMPTY, levelMapping, styles2, applyOptions = (object2, options = {}) => {
|
|
53825
|
+
if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {
|
|
53826
|
+
throw new Error("The `level` option should be an integer from 0 to 3");
|
|
53827
|
+
}
|
|
53828
|
+
const colorLevel = stdoutColor ? stdoutColor.level : 0;
|
|
53829
|
+
object2.level = options.level === undefined ? colorLevel : options.level;
|
|
53830
|
+
}, chalkFactory = (options) => {
|
|
53831
|
+
const chalk = (...strings) => strings.join(" ");
|
|
53832
|
+
applyOptions(chalk, options);
|
|
53833
|
+
Object.setPrototypeOf(chalk, createChalk.prototype);
|
|
53834
|
+
return chalk;
|
|
53835
|
+
}, getModelAnsi = (model, level, type, ...arguments_) => {
|
|
53836
|
+
if (model === "rgb") {
|
|
53837
|
+
if (level === "ansi16m") {
|
|
53838
|
+
return ansi_styles_default[type].ansi16m(...arguments_);
|
|
53839
|
+
}
|
|
53840
|
+
if (level === "ansi256") {
|
|
53841
|
+
return ansi_styles_default[type].ansi256(ansi_styles_default.rgbToAnsi256(...arguments_));
|
|
53842
|
+
}
|
|
53843
|
+
return ansi_styles_default[type].ansi(ansi_styles_default.rgbToAnsi(...arguments_));
|
|
53844
|
+
}
|
|
53845
|
+
if (model === "hex") {
|
|
53846
|
+
return getModelAnsi("rgb", level, type, ...ansi_styles_default.hexToRgb(...arguments_));
|
|
53847
|
+
}
|
|
53848
|
+
return ansi_styles_default[type][model](...arguments_);
|
|
53849
|
+
}, usedModels, proto, createStyler = (open4, close, parent) => {
|
|
53850
|
+
let openAll;
|
|
53851
|
+
let closeAll;
|
|
53852
|
+
if (parent === undefined) {
|
|
53853
|
+
openAll = open4;
|
|
53854
|
+
closeAll = close;
|
|
53855
|
+
} else {
|
|
53856
|
+
openAll = parent.openAll + open4;
|
|
53857
|
+
closeAll = close + parent.closeAll;
|
|
53858
|
+
}
|
|
53859
|
+
return {
|
|
53860
|
+
open: open4,
|
|
53861
|
+
close,
|
|
53862
|
+
openAll,
|
|
53863
|
+
closeAll,
|
|
53864
|
+
parent
|
|
53865
|
+
};
|
|
53866
|
+
}, createBuilder = (self2, _styler, _isEmpty) => {
|
|
53867
|
+
const builder = (...arguments_) => applyStyle(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" "));
|
|
53868
|
+
Object.setPrototypeOf(builder, proto);
|
|
53869
|
+
builder[GENERATOR] = self2;
|
|
53870
|
+
builder[STYLER] = _styler;
|
|
53871
|
+
builder[IS_EMPTY] = _isEmpty;
|
|
53872
|
+
return builder;
|
|
53873
|
+
}, applyStyle = (self2, string4) => {
|
|
53874
|
+
if (self2.level <= 0 || !string4) {
|
|
53875
|
+
return self2[IS_EMPTY] ? "" : string4;
|
|
53876
|
+
}
|
|
53877
|
+
let styler = self2[STYLER];
|
|
53878
|
+
if (styler === undefined) {
|
|
53879
|
+
return string4;
|
|
53880
|
+
}
|
|
53881
|
+
const { openAll, closeAll } = styler;
|
|
53882
|
+
if (string4.includes("\x1B")) {
|
|
53883
|
+
while (styler !== undefined) {
|
|
53884
|
+
string4 = stringReplaceAll(string4, styler.close, styler.open);
|
|
53885
|
+
styler = styler.parent;
|
|
53886
|
+
}
|
|
53887
|
+
}
|
|
53888
|
+
const lfIndex = string4.indexOf(`
|
|
53889
|
+
`);
|
|
53890
|
+
if (lfIndex !== -1) {
|
|
53891
|
+
string4 = stringEncaseCRLFWithFirstIndex(string4, closeAll, openAll, lfIndex);
|
|
53892
|
+
}
|
|
53893
|
+
return openAll + string4 + closeAll;
|
|
53894
|
+
}, chalk, chalkStderr, source_default;
|
|
53895
|
+
var init_source2 = __esm(() => {
|
|
53896
|
+
init_ansi_styles();
|
|
53897
|
+
init_supports_color();
|
|
53898
|
+
({ stdout: stdoutColor, stderr: stderrColor } = supports_color_default);
|
|
53899
|
+
GENERATOR = Symbol("GENERATOR");
|
|
53900
|
+
STYLER = Symbol("STYLER");
|
|
53901
|
+
IS_EMPTY = Symbol("IS_EMPTY");
|
|
53902
|
+
levelMapping = [
|
|
53903
|
+
"ansi",
|
|
53904
|
+
"ansi",
|
|
53905
|
+
"ansi256",
|
|
53906
|
+
"ansi16m"
|
|
53907
|
+
];
|
|
53908
|
+
styles2 = Object.create(null);
|
|
53909
|
+
Object.setPrototypeOf(createChalk.prototype, Function.prototype);
|
|
53910
|
+
for (const [styleName, style] of Object.entries(ansi_styles_default)) {
|
|
53911
|
+
styles2[styleName] = {
|
|
53912
|
+
get() {
|
|
53913
|
+
const builder = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]);
|
|
53914
|
+
Object.defineProperty(this, styleName, { value: builder });
|
|
53915
|
+
return builder;
|
|
53916
|
+
}
|
|
53917
|
+
};
|
|
53918
|
+
}
|
|
53919
|
+
styles2.visible = {
|
|
53920
|
+
get() {
|
|
53921
|
+
const builder = createBuilder(this, this[STYLER], true);
|
|
53922
|
+
Object.defineProperty(this, "visible", { value: builder });
|
|
53923
|
+
return builder;
|
|
53924
|
+
}
|
|
53925
|
+
};
|
|
53926
|
+
usedModels = ["rgb", "hex", "ansi256"];
|
|
53927
|
+
for (const model of usedModels) {
|
|
53928
|
+
styles2[model] = {
|
|
53929
|
+
get() {
|
|
53930
|
+
const { level } = this;
|
|
53931
|
+
return function(...arguments_) {
|
|
53932
|
+
const styler = createStyler(getModelAnsi(model, levelMapping[level], "color", ...arguments_), ansi_styles_default.color.close, this[STYLER]);
|
|
53933
|
+
return createBuilder(this, styler, this[IS_EMPTY]);
|
|
53934
|
+
};
|
|
53935
|
+
}
|
|
53936
|
+
};
|
|
53937
|
+
const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
|
|
53938
|
+
styles2[bgModel] = {
|
|
53939
|
+
get() {
|
|
53940
|
+
const { level } = this;
|
|
53941
|
+
return function(...arguments_) {
|
|
53942
|
+
const styler = createStyler(getModelAnsi(model, levelMapping[level], "bgColor", ...arguments_), ansi_styles_default.bgColor.close, this[STYLER]);
|
|
53943
|
+
return createBuilder(this, styler, this[IS_EMPTY]);
|
|
53944
|
+
};
|
|
53945
|
+
}
|
|
53946
|
+
};
|
|
53947
|
+
}
|
|
53948
|
+
proto = Object.defineProperties(() => {}, {
|
|
53949
|
+
...styles2,
|
|
53950
|
+
level: {
|
|
53951
|
+
enumerable: true,
|
|
53952
|
+
get() {
|
|
53953
|
+
return this[GENERATOR].level;
|
|
53954
|
+
},
|
|
53955
|
+
set(level) {
|
|
53956
|
+
this[GENERATOR].level = level;
|
|
53957
|
+
}
|
|
53958
|
+
}
|
|
53959
|
+
});
|
|
53960
|
+
Object.defineProperties(createChalk.prototype, styles2);
|
|
53961
|
+
chalk = createChalk();
|
|
53962
|
+
chalkStderr = createChalk({ level: stderrColor ? stderrColor.level : 0 });
|
|
53963
|
+
source_default = chalk;
|
|
53964
|
+
});
|
|
53965
|
+
|
|
53966
|
+
// src/utils/sequential.ts
|
|
53967
|
+
function sequential(fn) {
|
|
53968
|
+
const queue = [];
|
|
53969
|
+
let processing = false;
|
|
53970
|
+
async function processQueue() {
|
|
53971
|
+
if (processing)
|
|
53972
|
+
return;
|
|
53973
|
+
if (queue.length === 0)
|
|
53974
|
+
return;
|
|
53975
|
+
processing = true;
|
|
53976
|
+
while (queue.length > 0) {
|
|
53977
|
+
const { args, resolve: resolve9, reject, context } = queue.shift();
|
|
53978
|
+
try {
|
|
53979
|
+
const result = await fn.apply(context, args);
|
|
53980
|
+
resolve9(result);
|
|
53981
|
+
} catch (error40) {
|
|
53982
|
+
reject(error40);
|
|
53983
|
+
}
|
|
53984
|
+
}
|
|
53985
|
+
processing = false;
|
|
53986
|
+
if (queue.length > 0) {
|
|
53987
|
+
processQueue();
|
|
53988
|
+
}
|
|
53989
|
+
}
|
|
53990
|
+
return function(...args) {
|
|
53991
|
+
return new Promise((resolve9, reject) => {
|
|
53992
|
+
queue.push({ args, resolve: resolve9, reject, context: this });
|
|
53993
|
+
processQueue();
|
|
53994
|
+
});
|
|
53995
|
+
};
|
|
53996
|
+
}
|
|
53997
|
+
|
|
53965
53998
|
// src/utils/model/bedrock.ts
|
|
53966
53999
|
function findFirstMatch(profiles, substring) {
|
|
53967
54000
|
return profiles.find((p) => p.includes(substring)) ?? null;
|
|
@@ -55639,9 +55672,6 @@ function setCachedOllamaModelNames(names) {
|
|
|
55639
55672
|
cachedOllamaModelNames = names;
|
|
55640
55673
|
}
|
|
55641
55674
|
}
|
|
55642
|
-
function getOllamaBaseUrl() {
|
|
55643
|
-
return OLLAMA_BASE_URL;
|
|
55644
|
-
}
|
|
55645
55675
|
function parseOllamaModelNames(value) {
|
|
55646
55676
|
if (!value || typeof value !== "object" || !("models" in value)) {
|
|
55647
55677
|
return [];
|
|
@@ -55825,8 +55855,9 @@ function toPositiveInteger(value) {
|
|
|
55825
55855
|
function normalizeOllamaModelName(model) {
|
|
55826
55856
|
return model.trim().toLowerCase();
|
|
55827
55857
|
}
|
|
55828
|
-
var
|
|
55858
|
+
var ollamaModelMetadataByName, cachedOllamaModelNames, OLLAMA_CLOUD_MIN_CONTEXT = 131072;
|
|
55829
55859
|
var init_ollamaModels = __esm(() => {
|
|
55860
|
+
init_ollamaConfig();
|
|
55830
55861
|
init_ollamaRouter();
|
|
55831
55862
|
ollamaModelMetadataByName = new Map;
|
|
55832
55863
|
cachedOllamaModelNames = [];
|
|
@@ -57043,7 +57074,7 @@ async function fetchOllamaChat(params, stream4, controller, options) {
|
|
|
57043
57074
|
const timeoutId = timeout > 0 ? setTimeout(() => controller.abort(), timeout) : undefined;
|
|
57044
57075
|
try {
|
|
57045
57076
|
const capabilities = await getOllamaModelCapabilities(params.model, controller.signal);
|
|
57046
|
-
const response = await fetch(`${
|
|
57077
|
+
const response = await fetch(`${getOllamaBaseUrl()}/api/chat`, {
|
|
57047
57078
|
method: "POST",
|
|
57048
57079
|
headers: {
|
|
57049
57080
|
"Content-Type": "application/json"
|
|
@@ -57086,9 +57117,6 @@ function createLinkedAbortController(options) {
|
|
|
57086
57117
|
signal.addEventListener("abort", () => controller.abort(), { once: true });
|
|
57087
57118
|
return controller;
|
|
57088
57119
|
}
|
|
57089
|
-
function getOllamaBaseUrl2() {
|
|
57090
|
-
return OLLAMA_BASE_URL2;
|
|
57091
|
-
}
|
|
57092
57120
|
function getOllamaRequestTimeoutMs(options, env4 = process.env) {
|
|
57093
57121
|
if (options?.timeout !== undefined) {
|
|
57094
57122
|
return options.timeout;
|
|
@@ -57329,7 +57357,7 @@ async function getOllamaModelCapabilities(model, signal) {
|
|
|
57329
57357
|
return ollamaModelCapabilitiesCache.get(normalizedModel) ?? null;
|
|
57330
57358
|
}
|
|
57331
57359
|
try {
|
|
57332
|
-
const response = await fetch(`${
|
|
57360
|
+
const response = await fetch(`${getOllamaBaseUrl()}/api/show`, {
|
|
57333
57361
|
method: "POST",
|
|
57334
57362
|
headers: {
|
|
57335
57363
|
"Content-Type": "application/json"
|
|
@@ -57871,10 +57899,11 @@ function parseToolInput(input) {
|
|
|
57871
57899
|
return {};
|
|
57872
57900
|
}
|
|
57873
57901
|
}
|
|
57874
|
-
var
|
|
57902
|
+
var DEFAULT_OLLAMA_REQUEST_TIMEOUT_MS = 300000, REMOTE_OLLAMA_REQUEST_TIMEOUT_MS = 120000, ollamaModelCapabilitiesCache;
|
|
57875
57903
|
var init_ollama = __esm(() => {
|
|
57876
57904
|
init_urhq_sdk();
|
|
57877
57905
|
init_ollamaModels();
|
|
57906
|
+
init_ollamaConfig();
|
|
57878
57907
|
init_ollamaTuning();
|
|
57879
57908
|
init_kimiToolCalls();
|
|
57880
57909
|
ollamaModelCapabilitiesCache = new Map;
|
|
@@ -71167,7 +71196,7 @@ var init_auth = __esm(() => {
|
|
|
71167
71196
|
|
|
71168
71197
|
// src/utils/userAgent.ts
|
|
71169
71198
|
function getURCodeUserAgent() {
|
|
71170
|
-
return `ur/${"1.
|
|
71199
|
+
return `ur/${"1.16.1"}`;
|
|
71171
71200
|
}
|
|
71172
71201
|
|
|
71173
71202
|
// src/utils/workloadContext.ts
|
|
@@ -71189,7 +71218,7 @@ function getUserAgent() {
|
|
|
71189
71218
|
const clientApp = process.env.UR_AGENT_SDK_CLIENT_APP ? `, client-app/${process.env.UR_AGENT_SDK_CLIENT_APP}` : "";
|
|
71190
71219
|
const workload = getWorkload();
|
|
71191
71220
|
const workloadSuffix = workload ? `, workload/${workload}` : "";
|
|
71192
|
-
return `ur-cli/${"1.
|
|
71221
|
+
return `ur-cli/${"1.16.1"} (${process.env.USER_TYPE}, ${process.env.UR_CODE_ENTRYPOINT ?? "cli"}${agentSdkVersion}${clientApp}${workloadSuffix})`;
|
|
71193
71222
|
}
|
|
71194
71223
|
function getMCPUserAgent() {
|
|
71195
71224
|
const parts = [];
|
|
@@ -71203,7 +71232,7 @@ function getMCPUserAgent() {
|
|
|
71203
71232
|
parts.push(`client-app/${process.env.UR_AGENT_SDK_CLIENT_APP}`);
|
|
71204
71233
|
}
|
|
71205
71234
|
const suffix = parts.length > 0 ? ` (${parts.join(", ")})` : "";
|
|
71206
|
-
return `ur/${"1.
|
|
71235
|
+
return `ur/${"1.16.1"}${suffix}`;
|
|
71207
71236
|
}
|
|
71208
71237
|
function getWebFetchUserAgent() {
|
|
71209
71238
|
return `UR-User (${getURCodeUserAgent()})`;
|
|
@@ -71341,7 +71370,7 @@ var init_user = __esm(() => {
|
|
|
71341
71370
|
deviceId,
|
|
71342
71371
|
sessionId: getSessionId(),
|
|
71343
71372
|
email: getEmail(),
|
|
71344
|
-
appVersion: "1.
|
|
71373
|
+
appVersion: "1.16.1",
|
|
71345
71374
|
platform: getHostPlatformForAnalytics(),
|
|
71346
71375
|
organizationUuid,
|
|
71347
71376
|
accountUuid,
|
|
@@ -76392,23 +76421,23 @@ async function detectJetBrainsIDEFromParentProcessAsync() {
|
|
|
76392
76421
|
}
|
|
76393
76422
|
async function getTerminalWithJetBrainsDetectionAsync() {
|
|
76394
76423
|
if (process.env.TERMINAL_EMULATOR === "JetBrains-JediTerm") {
|
|
76395
|
-
if (
|
|
76424
|
+
if (env2.platform !== "darwin") {
|
|
76396
76425
|
const specificIDE = await detectJetBrainsIDEFromParentProcessAsync();
|
|
76397
76426
|
return specificIDE || "pycharm";
|
|
76398
76427
|
}
|
|
76399
76428
|
}
|
|
76400
|
-
return
|
|
76429
|
+
return env2.terminal;
|
|
76401
76430
|
}
|
|
76402
76431
|
function getTerminalWithJetBrainsDetection() {
|
|
76403
76432
|
if (process.env.TERMINAL_EMULATOR === "JetBrains-JediTerm") {
|
|
76404
|
-
if (
|
|
76433
|
+
if (env2.platform !== "darwin") {
|
|
76405
76434
|
if (jetBrainsIDECache !== undefined) {
|
|
76406
76435
|
return jetBrainsIDECache || "pycharm";
|
|
76407
76436
|
}
|
|
76408
76437
|
return "pycharm";
|
|
76409
76438
|
}
|
|
76410
76439
|
}
|
|
76411
|
-
return
|
|
76440
|
+
return env2.terminal;
|
|
76412
76441
|
}
|
|
76413
76442
|
async function initJetBrainsDetection() {
|
|
76414
76443
|
if (process.env.TERMINAL_EMULATOR === "JetBrains-JediTerm") {
|
|
@@ -76437,7 +76466,7 @@ var init_envDynamic = __esm(() => {
|
|
|
76437
76466
|
});
|
|
76438
76467
|
}
|
|
76439
76468
|
envDynamic = {
|
|
76440
|
-
...
|
|
76469
|
+
...env2,
|
|
76441
76470
|
terminal: getTerminalWithJetBrainsDetection(),
|
|
76442
76471
|
getIsDocker,
|
|
76443
76472
|
getIsBubblewrapSandbox,
|
|
@@ -77118,30 +77147,30 @@ var init_metadata = __esm(() => {
|
|
|
77118
77147
|
COMPOUND_OPERATOR_REGEX = /\s*(?:&&|\|\||[;|])\s*/;
|
|
77119
77148
|
WHITESPACE_REGEX = /\s+/;
|
|
77120
77149
|
getVersionBase = memoize_default(() => {
|
|
77121
|
-
const match = "1.
|
|
77150
|
+
const match = "1.16.1".match(/^\d+\.\d+\.\d+(?:-[a-z]+)?/);
|
|
77122
77151
|
return match ? match[0] : undefined;
|
|
77123
77152
|
});
|
|
77124
77153
|
buildEnvContext = memoize_default(async () => {
|
|
77125
77154
|
const [packageManagers, runtimes, linuxDistroInfo, vcs] = await Promise.all([
|
|
77126
|
-
|
|
77127
|
-
|
|
77155
|
+
env2.getPackageManagers(),
|
|
77156
|
+
env2.getRuntimes(),
|
|
77128
77157
|
getLinuxDistroInfo(),
|
|
77129
77158
|
detectVcs()
|
|
77130
77159
|
]);
|
|
77131
77160
|
return {
|
|
77132
77161
|
platform: getHostPlatformForAnalytics(),
|
|
77133
77162
|
platformRaw: process.env.UR_CODE_HOST_PLATFORM || process.platform,
|
|
77134
|
-
arch:
|
|
77135
|
-
nodeVersion:
|
|
77163
|
+
arch: env2.arch,
|
|
77164
|
+
nodeVersion: env2.nodeVersion,
|
|
77136
77165
|
terminal: envDynamic.terminal,
|
|
77137
77166
|
packageManagers: packageManagers.join(","),
|
|
77138
77167
|
runtimes: runtimes.join(","),
|
|
77139
|
-
isRunningWithBun:
|
|
77168
|
+
isRunningWithBun: env2.isRunningWithBun(),
|
|
77140
77169
|
isCi: isEnvTruthy(process.env.CI),
|
|
77141
77170
|
isClaubbit: isEnvTruthy(process.env.CLAUBBIT),
|
|
77142
77171
|
isURCodeRemote: isEnvTruthy(process.env.UR_CODE_REMOTE),
|
|
77143
77172
|
isLocalAgentMode: process.env.UR_CODE_ENTRYPOINT === "local-agent",
|
|
77144
|
-
isConductor:
|
|
77173
|
+
isConductor: env2.isConductor(),
|
|
77145
77174
|
...process.env.UR_CODE_REMOTE_ENVIRONMENT_TYPE && {
|
|
77146
77175
|
remoteEnvironmentType: process.env.UR_CODE_REMOTE_ENVIRONMENT_TYPE
|
|
77147
77176
|
},
|
|
@@ -77158,10 +77187,10 @@ var init_metadata = __esm(() => {
|
|
|
77158
77187
|
isGithubAction: isEnvTruthy(process.env.GITHUB_ACTIONS),
|
|
77159
77188
|
isURCodeAction: isEnvTruthy(process.env.UR_CODE_ACTION),
|
|
77160
77189
|
isURAiAuth: isURAISubscriber2(),
|
|
77161
|
-
version: "1.
|
|
77190
|
+
version: "1.16.1",
|
|
77162
77191
|
versionBase: getVersionBase(),
|
|
77163
77192
|
buildTime: "",
|
|
77164
|
-
deploymentEnvironment:
|
|
77193
|
+
deploymentEnvironment: env2.detectDeploymentEnvironment(),
|
|
77165
77194
|
...isEnvTruthy(process.env.GITHUB_ACTIONS) && {
|
|
77166
77195
|
githubEventName: process.env.GITHUB_EVENT_NAME,
|
|
77167
77196
|
githubActionsRunnerEnvironment: process.env.RUNNER_ENVIRONMENT,
|
|
@@ -77828,7 +77857,7 @@ function initialize1PEventLogging() {
|
|
|
77828
77857
|
const platform2 = getPlatform();
|
|
77829
77858
|
const attributes = {
|
|
77830
77859
|
[import_semantic_conventions4.ATTR_SERVICE_NAME]: "ur",
|
|
77831
|
-
[import_semantic_conventions4.ATTR_SERVICE_VERSION]: "1.
|
|
77860
|
+
[import_semantic_conventions4.ATTR_SERVICE_VERSION]: "1.16.1"
|
|
77832
77861
|
};
|
|
77833
77862
|
if (platform2 === "wsl") {
|
|
77834
77863
|
const wslVersion = getWslVersion();
|
|
@@ -77855,7 +77884,7 @@ function initialize1PEventLogging() {
|
|
|
77855
77884
|
})
|
|
77856
77885
|
]
|
|
77857
77886
|
});
|
|
77858
|
-
firstPartyEventLogger = firstPartyEventLoggerProvider.getLogger("com.urhq.ur.events", "1.
|
|
77887
|
+
firstPartyEventLogger = firstPartyEventLoggerProvider.getLogger("com.urhq.ur.events", "1.16.1");
|
|
77859
77888
|
}
|
|
77860
77889
|
async function reinitialize1PEventLoggingIfConfigChanged() {
|
|
77861
77890
|
if (!is1PEventLoggingEnabled() || !firstPartyEventLoggerProvider) {
|
|
@@ -79723,7 +79752,7 @@ function getAttributionHeader(fingerprint) {
|
|
|
79723
79752
|
if (!isAttributionHeaderEnabled()) {
|
|
79724
79753
|
return "";
|
|
79725
79754
|
}
|
|
79726
|
-
const version2 = `${"1.
|
|
79755
|
+
const version2 = `${"1.16.1"}.${fingerprint}`;
|
|
79727
79756
|
const entrypoint = process.env.UR_CODE_ENTRYPOINT ?? "unknown";
|
|
79728
79757
|
const cch = "";
|
|
79729
79758
|
const workload = getWorkload();
|
|
@@ -101084,7 +101113,7 @@ var init_dec = __esm(() => {
|
|
|
101084
101113
|
// src/ink/termio/osc.ts
|
|
101085
101114
|
import { Buffer as Buffer8 } from "buffer";
|
|
101086
101115
|
function osc(...parts) {
|
|
101087
|
-
const terminator =
|
|
101116
|
+
const terminator = env2.terminal === "kitty" ? ST : BEL;
|
|
101088
101117
|
return `${OSC_PREFIX}${parts.join(SEP)}${terminator}`;
|
|
101089
101118
|
}
|
|
101090
101119
|
function wrapForMultiplexer(sequence) {
|
|
@@ -101418,7 +101447,7 @@ function isXtermJs() {
|
|
|
101418
101447
|
return xtversionName?.startsWith("xterm.js") ?? false;
|
|
101419
101448
|
}
|
|
101420
101449
|
function supportsExtendedKeys() {
|
|
101421
|
-
return EXTENDED_KEYS_TERMINALS.includes(
|
|
101450
|
+
return EXTENDED_KEYS_TERMINALS.includes(env2.terminal ?? "");
|
|
101422
101451
|
}
|
|
101423
101452
|
function hasCursorUpViewportYankBug() {
|
|
101424
101453
|
return process.platform === "win32" || !!process.env.WT_SESSION;
|
|
@@ -107595,7 +107624,7 @@ var init_theme = __esm(() => {
|
|
|
107595
107624
|
rainbow_indigo_shimmer: "rgb(195,180,230)",
|
|
107596
107625
|
rainbow_violet_shimmer: "rgb(230,180,210)"
|
|
107597
107626
|
};
|
|
107598
|
-
chalkForChart =
|
|
107627
|
+
chalkForChart = env2.terminal === "Apple_Terminal" ? new Chalk({ level: 2 }) : source_default;
|
|
107599
107628
|
});
|
|
107600
107629
|
|
|
107601
107630
|
// src/components/design-system/color.ts
|
|
@@ -186352,7 +186381,7 @@ function getTelemetryAttributes() {
|
|
|
186352
186381
|
attributes["session.id"] = sessionId;
|
|
186353
186382
|
}
|
|
186354
186383
|
if (shouldIncludeAttribute("OTEL_METRICS_INCLUDE_VERSION")) {
|
|
186355
|
-
attributes["app.version"] = "1.
|
|
186384
|
+
attributes["app.version"] = "1.16.1";
|
|
186356
186385
|
}
|
|
186357
186386
|
const oauthAccount = getOauthAccountInfo();
|
|
186358
186387
|
if (oauthAccount) {
|
|
@@ -221524,7 +221553,7 @@ function IdeOnboardingDialog(t0) {
|
|
|
221524
221553
|
const ideName = t4;
|
|
221525
221554
|
const installedVersion = installationStatus?.installedVersion;
|
|
221526
221555
|
const pluginOrExtension = isJetBrains ? "plugin" : "extension";
|
|
221527
|
-
const mentionShortcut =
|
|
221556
|
+
const mentionShortcut = env2.platform === "darwin" ? "Cmd+Option+K" : "Ctrl+Alt+K";
|
|
221528
221557
|
let t5;
|
|
221529
221558
|
if ($3[7] === Symbol.for("react.memo_cache_sentinel")) {
|
|
221530
221559
|
t5 = /* @__PURE__ */ jsx_dev_runtime37.jsxDEV(ThemedText, {
|
|
@@ -221765,7 +221794,7 @@ function getTerminalIdeType() {
|
|
|
221765
221794
|
if (!isSupportedTerminal()) {
|
|
221766
221795
|
return null;
|
|
221767
221796
|
}
|
|
221768
|
-
return
|
|
221797
|
+
return env2.terminal;
|
|
221769
221798
|
}
|
|
221770
221799
|
async function getSortedIdeLockfiles() {
|
|
221771
221800
|
try {
|
|
@@ -222141,7 +222170,7 @@ function getInstallationEnv() {
|
|
|
222141
222170
|
return;
|
|
222142
222171
|
}
|
|
222143
222172
|
function getURCodeVersion() {
|
|
222144
|
-
return "1.
|
|
222173
|
+
return "1.16.1";
|
|
222145
222174
|
}
|
|
222146
222175
|
async function getInstalledVSCodeExtensionVersion(command) {
|
|
222147
222176
|
const { stdout } = await execFileNoThrow(command, ["--list-extensions", "--show-versions"], {
|
|
@@ -222591,7 +222620,7 @@ var init_ide = __esm(() => {
|
|
|
222591
222620
|
}
|
|
222592
222621
|
};
|
|
222593
222622
|
isSupportedVSCodeTerminal = memoize_default(() => {
|
|
222594
|
-
return isVSCodeIde(
|
|
222623
|
+
return isVSCodeIde(env2.terminal);
|
|
222595
222624
|
});
|
|
222596
222625
|
isSupportedJetBrainsTerminal = memoize_default(() => {
|
|
222597
222626
|
return isJetBrainsIde(envDynamic.terminal);
|
|
@@ -224869,7 +224898,7 @@ async function setupSdkMcpClients(sdkMcpConfigs, sendMcpMessage) {
|
|
|
224869
224898
|
const client2 = new Client({
|
|
224870
224899
|
name: "ur",
|
|
224871
224900
|
title: "UR",
|
|
224872
|
-
version: "1.
|
|
224901
|
+
version: "1.16.1",
|
|
224873
224902
|
description: "URHQ's agentic coding tool",
|
|
224874
224903
|
websiteUrl: PRODUCT_URL
|
|
224875
224904
|
}, {
|
|
@@ -225223,7 +225252,7 @@ var init_client5 = __esm(() => {
|
|
|
225223
225252
|
const client2 = new Client({
|
|
225224
225253
|
name: "ur",
|
|
225225
225254
|
title: "UR",
|
|
225226
|
-
version: "1.
|
|
225255
|
+
version: "1.16.1",
|
|
225227
225256
|
description: "URHQ's agentic coding tool",
|
|
225228
225257
|
websiteUrl: PRODUCT_URL
|
|
225229
225258
|
}, {
|
|
@@ -235036,9 +235065,9 @@ async function assertMinVersion() {
|
|
|
235036
235065
|
if (false) {}
|
|
235037
235066
|
try {
|
|
235038
235067
|
const versionConfig = await getDynamicConfig_BLOCKS_ON_INIT("tengu_version_config", { minVersion: "0.0.0" });
|
|
235039
|
-
if (versionConfig.minVersion && lt("1.
|
|
235068
|
+
if (versionConfig.minVersion && lt("1.16.1", versionConfig.minVersion)) {
|
|
235040
235069
|
console.error(`
|
|
235041
|
-
It looks like your version of UR (${"1.
|
|
235070
|
+
It looks like your version of UR (${"1.16.1"}) needs an update.
|
|
235042
235071
|
A newer version (${versionConfig.minVersion} or higher) is required to continue.
|
|
235043
235072
|
|
|
235044
235073
|
To update, please run:
|
|
@@ -235163,7 +235192,7 @@ async function releaseLock() {
|
|
|
235163
235192
|
}
|
|
235164
235193
|
}
|
|
235165
235194
|
async function getInstallationPrefix() {
|
|
235166
|
-
const isBun =
|
|
235195
|
+
const isBun = env2.isRunningWithBun();
|
|
235167
235196
|
let prefixResult = null;
|
|
235168
235197
|
if (isBun) {
|
|
235169
235198
|
prefixResult = await execFileNoThrowWithCwd("bun", ["pm", "bin", "-g"], {
|
|
@@ -235254,16 +235283,16 @@ async function installGlobalPackage(specificVersion) {
|
|
|
235254
235283
|
logError2(new AutoUpdaterError("Another process is currently installing an update"));
|
|
235255
235284
|
logEvent("tengu_auto_updater_lock_contention", {
|
|
235256
235285
|
pid: process.pid,
|
|
235257
|
-
currentVersion: "1.
|
|
235286
|
+
currentVersion: "1.16.1"
|
|
235258
235287
|
});
|
|
235259
235288
|
return "in_progress";
|
|
235260
235289
|
}
|
|
235261
235290
|
try {
|
|
235262
235291
|
await removeURAliasesFromShellConfigs();
|
|
235263
|
-
if (!
|
|
235292
|
+
if (!env2.isRunningWithBun() && env2.isNpmFromWindowsPath()) {
|
|
235264
235293
|
logError2(new Error("Windows NPM detected in WSL environment"));
|
|
235265
235294
|
logEvent("tengu_auto_updater_windows_npm_in_wsl", {
|
|
235266
|
-
currentVersion: "1.
|
|
235295
|
+
currentVersion: "1.16.1"
|
|
235267
235296
|
});
|
|
235268
235297
|
console.error(`
|
|
235269
235298
|
Error: Windows NPM detected in WSL
|
|
@@ -235283,7 +235312,7 @@ To fix this issue:
|
|
|
235283
235312
|
return "no_permissions";
|
|
235284
235313
|
}
|
|
235285
235314
|
const packageSpec = specificVersion ? `${"ur-agent"}@${specificVersion}` : "ur-agent";
|
|
235286
|
-
const packageManager =
|
|
235315
|
+
const packageManager = env2.isRunningWithBun() ? "bun" : "npm";
|
|
235287
235316
|
const installResult = await execFileNoThrowWithCwd(packageManager, ["install", "-g", packageSpec], { cwd: homedir18() });
|
|
235288
235317
|
if (installResult.code !== 0) {
|
|
235289
235318
|
const error40 = new AutoUpdaterError(`Failed to install new version of ur: ${installResult.stdout} ${installResult.stderr}`);
|
|
@@ -235798,7 +235827,7 @@ function detectLinuxGlobPatternWarnings() {
|
|
|
235798
235827
|
}
|
|
235799
235828
|
async function getDoctorDiagnostic() {
|
|
235800
235829
|
const installationType = await getCurrentInstallationType();
|
|
235801
|
-
const version2 = typeof MACRO !== "undefined" ? "1.
|
|
235830
|
+
const version2 = typeof MACRO !== "undefined" ? "1.16.1" : "unknown";
|
|
235802
235831
|
const installationPath = await getInstallationPath();
|
|
235803
235832
|
const invokedBinary = getInvokedBinary();
|
|
235804
235833
|
const multipleInstallations = await detectMultipleInstallations();
|
|
@@ -236472,7 +236501,7 @@ import {
|
|
|
236472
236501
|
import { homedir as homedir20 } from "os";
|
|
236473
236502
|
import { basename as basename14, delimiter as delimiter4, dirname as dirname26, join as join67, resolve as resolve20 } from "path";
|
|
236474
236503
|
function getPlatform2() {
|
|
236475
|
-
const os4 =
|
|
236504
|
+
const os4 = env2.platform;
|
|
236476
236505
|
const arch = process.arch === "x64" ? "x64" : process.arch === "arm64" ? "arm64" : null;
|
|
236477
236506
|
if (!arch) {
|
|
236478
236507
|
const error40 = new Error(`Unsupported architecture: ${process.arch}`);
|
|
@@ -236733,8 +236762,8 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
|
|
|
236733
236762
|
const maxVersion = await getMaxVersion();
|
|
236734
236763
|
if (maxVersion && gt(version2, maxVersion)) {
|
|
236735
236764
|
logForDebugging(`Native installer: maxVersion ${maxVersion} is set, capping update from ${version2} to ${maxVersion}`);
|
|
236736
|
-
if (gte("1.
|
|
236737
|
-
logForDebugging(`Native installer: current version ${"1.
|
|
236765
|
+
if (gte("1.16.1", maxVersion)) {
|
|
236766
|
+
logForDebugging(`Native installer: current version ${"1.16.1"} is already at or above maxVersion ${maxVersion}, skipping update`);
|
|
236738
236767
|
logEvent("tengu_native_update_skipped_max_version", {
|
|
236739
236768
|
latency_ms: Date.now() - startTime,
|
|
236740
236769
|
max_version: maxVersion,
|
|
@@ -236745,7 +236774,7 @@ async function updateLatest(channelOrVersion, forceReinstall = false) {
|
|
|
236745
236774
|
version2 = maxVersion;
|
|
236746
236775
|
}
|
|
236747
236776
|
}
|
|
236748
|
-
if (!forceReinstall && version2 === "1.
|
|
236777
|
+
if (!forceReinstall && version2 === "1.16.1" && await versionIsAvailable(version2) && await isPossibleURBinary(executablePath)) {
|
|
236749
236778
|
logForDebugging(`Found ${version2} at ${executablePath}, skipping install`);
|
|
236750
236779
|
logEvent("tengu_native_update_complete", {
|
|
236751
236780
|
latency_ms: Date.now() - startTime,
|
|
@@ -238166,7 +238195,7 @@ async function sendNotification(notif, terminal) {
|
|
|
238166
238195
|
logEvent("tengu_notification_method_used", {
|
|
238167
238196
|
configured_channel: channel,
|
|
238168
238197
|
method_used: methodUsed,
|
|
238169
|
-
term:
|
|
238198
|
+
term: env2.terminal
|
|
238170
238199
|
});
|
|
238171
238200
|
}
|
|
238172
238201
|
async function sendToChannel(channel, opts, terminal) {
|
|
@@ -238202,7 +238231,7 @@ async function sendToChannel(channel, opts, terminal) {
|
|
|
238202
238231
|
}
|
|
238203
238232
|
async function sendAuto(opts, terminal) {
|
|
238204
238233
|
const title = opts.title || DEFAULT_TITLE;
|
|
238205
|
-
switch (
|
|
238234
|
+
switch (env2.terminal) {
|
|
238206
238235
|
case "Apple_Terminal": {
|
|
238207
238236
|
const bellDisabled = await isAppleTerminalBellDisabled();
|
|
238208
238237
|
if (bellDisabled) {
|
|
@@ -238229,7 +238258,7 @@ function generateKittyId() {
|
|
|
238229
238258
|
}
|
|
238230
238259
|
async function isAppleTerminalBellDisabled() {
|
|
238231
238260
|
try {
|
|
238232
|
-
if (
|
|
238261
|
+
if (env2.terminal !== "Apple_Terminal") {
|
|
238233
238262
|
return false;
|
|
238234
238263
|
}
|
|
238235
238264
|
const osascriptResult = await execFileNoThrow("osascript", [
|
|
@@ -240687,7 +240716,7 @@ function isInITerm2() {
|
|
|
240687
240716
|
}
|
|
240688
240717
|
const termProgram = process.env.TERM_PROGRAM;
|
|
240689
240718
|
const hasItermSessionId = !!process.env.ITERM_SESSION_ID;
|
|
240690
|
-
const terminalIsITerm =
|
|
240719
|
+
const terminalIsITerm = env2.terminal === "iTerm.app";
|
|
240691
240720
|
isInITerm2Cached = termProgram === "iTerm.app" || hasItermSessionId || terminalIsITerm;
|
|
240692
240721
|
return isInITerm2Cached;
|
|
240693
240722
|
}
|
|
@@ -272118,7 +272147,7 @@ function BackgroundHint(t0) {
|
|
|
272118
272147
|
}
|
|
272119
272148
|
useKeybinding("task:background", handleBackground, t3);
|
|
272120
272149
|
const baseShortcut = useShortcutDisplay("task:background", "Task", "ctrl+b");
|
|
272121
|
-
const shortcut =
|
|
272150
|
+
const shortcut = env2.terminal === "tmux" && baseShortcut === "ctrl+b" ? "ctrl+b ctrl+b (twice)" : baseShortcut;
|
|
272122
272151
|
if (isEnvTruthy(process.env.UR_CODE_DISABLE_BACKGROUND_TASKS)) {
|
|
272123
272152
|
return null;
|
|
272124
272153
|
}
|
|
@@ -289170,7 +289199,7 @@ async function embedTexts(texts, options2) {
|
|
|
289170
289199
|
}
|
|
289171
289200
|
let response;
|
|
289172
289201
|
try {
|
|
289173
|
-
response = await fetch(`${
|
|
289202
|
+
response = await fetch(`${getOllamaBaseUrl()}/api/embed`, {
|
|
289174
289203
|
method: "POST",
|
|
289175
289204
|
headers: { "Content-Type": "application/json" },
|
|
289176
289205
|
body: JSON.stringify({ model: options2.model, input: texts }),
|
|
@@ -289178,7 +289207,7 @@ async function embedTexts(texts, options2) {
|
|
|
289178
289207
|
});
|
|
289179
289208
|
} catch (error40) {
|
|
289180
289209
|
const message = error40 instanceof Error ? error40.message : String(error40);
|
|
289181
|
-
throw new Error(`Could not reach the
|
|
289210
|
+
throw new Error(`Could not reach the Ollama app at ${getOllamaBaseUrl()} for embeddings: ${message}`);
|
|
289182
289211
|
}
|
|
289183
289212
|
if (!response.ok) {
|
|
289184
289213
|
const body = await response.text().catch(() => "");
|
|
@@ -289200,7 +289229,10 @@ async function embedQuery(query2, options2) {
|
|
|
289200
289229
|
}
|
|
289201
289230
|
return vector;
|
|
289202
289231
|
}
|
|
289203
|
-
var
|
|
289232
|
+
var DEFAULT_EMBED_MODEL = "nomic-embed-text";
|
|
289233
|
+
var init_embeddings = __esm(() => {
|
|
289234
|
+
init_ollamaConfig();
|
|
289235
|
+
});
|
|
289204
289236
|
|
|
289205
289237
|
// src/utils/codeIndex/store.ts
|
|
289206
289238
|
import { createHash as createHash18 } from "crypto";
|
|
@@ -289467,6 +289499,7 @@ function previewOf(text, maxLines = 8) {
|
|
|
289467
289499
|
var INDEXABLE_EXTENSIONS, MAX_FILE_BYTES = 200000, DEFAULT_MAX_FILES = 5000, EMBED_BATCH_SIZE = 32, SKIP_SEGMENTS;
|
|
289468
289500
|
var init_indexer = __esm(() => {
|
|
289469
289501
|
init_ripgrep();
|
|
289502
|
+
init_embeddings();
|
|
289470
289503
|
init_store();
|
|
289471
289504
|
INDEXABLE_EXTENSIONS = new Set([
|
|
289472
289505
|
".ts",
|
|
@@ -289745,6 +289778,7 @@ function isCodeIndexEnabled(env4 = process.env) {
|
|
|
289745
289778
|
return value !== "" && value !== "0" && value !== "false" && value !== "off";
|
|
289746
289779
|
}
|
|
289747
289780
|
var init_codeIndex = __esm(() => {
|
|
289781
|
+
init_embeddings();
|
|
289748
289782
|
init_store();
|
|
289749
289783
|
init_indexer();
|
|
289750
289784
|
init_graph();
|
|
@@ -311744,7 +311778,7 @@ async function withFixture(input, fixtureName, f) {
|
|
|
311744
311778
|
throw e;
|
|
311745
311779
|
}
|
|
311746
311780
|
}
|
|
311747
|
-
if ((
|
|
311781
|
+
if ((env2.isCI || process.env.CI) && !isEnvTruthy(process.env.VCR_RECORD)) {
|
|
311748
311782
|
throw new Error(`Fixture missing: ${filename}. Re-run tests with VCR_RECORD=1, then commit the result.`);
|
|
311749
311783
|
}
|
|
311750
311784
|
const result = await f();
|
|
@@ -311779,12 +311813,12 @@ async function withVCR(messages, f) {
|
|
|
311779
311813
|
throw e;
|
|
311780
311814
|
}
|
|
311781
311815
|
}
|
|
311782
|
-
if (
|
|
311816
|
+
if (env2.isCI && !isEnvTruthy(process.env.VCR_RECORD)) {
|
|
311783
311817
|
throw new Error(`URHQ API fixture missing: ${filename}. Re-run tests with VCR_RECORD=1, then commit the result. Input messages:
|
|
311784
311818
|
${jsonStringify(dehydratedInput, null, 2)}`);
|
|
311785
311819
|
}
|
|
311786
311820
|
const results = await f();
|
|
311787
|
-
if (
|
|
311821
|
+
if (env2.isCI && !isEnvTruthy(process.env.VCR_RECORD)) {
|
|
311788
311822
|
return results;
|
|
311789
311823
|
}
|
|
311790
311824
|
await mkdir23(dirname37(filename), { recursive: true });
|
|
@@ -327219,10 +327253,10 @@ function isVSCodeRemoteSSH() {
|
|
|
327219
327253
|
return askpassMain.includes(".vscode-server") || askpassMain.includes(".cursor-server") || askpassMain.includes(".windsurf-server") || path15.includes(".vscode-server") || path15.includes(".cursor-server") || path15.includes(".windsurf-server");
|
|
327220
327254
|
}
|
|
327221
327255
|
function getNativeCSIuTerminalDisplayName() {
|
|
327222
|
-
if (!
|
|
327256
|
+
if (!env2.terminal || !(env2.terminal in NATIVE_CSIU_TERMINALS)) {
|
|
327223
327257
|
return null;
|
|
327224
327258
|
}
|
|
327225
|
-
return NATIVE_CSIU_TERMINALS[
|
|
327259
|
+
return NATIVE_CSIU_TERMINALS[env2.terminal] ?? null;
|
|
327226
327260
|
}
|
|
327227
327261
|
function formatPathLink(filePath) {
|
|
327228
327262
|
if (!supportsHyperlinks()) {
|
|
@@ -327232,11 +327266,11 @@ function formatPathLink(filePath) {
|
|
|
327232
327266
|
return `\x1B]8;;${fileUrl}\x07${filePath}\x1B]8;;\x07`;
|
|
327233
327267
|
}
|
|
327234
327268
|
function shouldOfferTerminalSetup() {
|
|
327235
|
-
return platform4() === "darwin" &&
|
|
327269
|
+
return platform4() === "darwin" && env2.terminal === "Apple_Terminal" || env2.terminal === "vscode" || env2.terminal === "cursor" || env2.terminal === "windsurf" || env2.terminal === "alacritty" || env2.terminal === "zed";
|
|
327236
327270
|
}
|
|
327237
327271
|
async function setupTerminal(theme) {
|
|
327238
327272
|
let result = "";
|
|
327239
|
-
switch (
|
|
327273
|
+
switch (env2.terminal) {
|
|
327240
327274
|
case "Apple_Terminal":
|
|
327241
327275
|
result = await enableOptionAsMetaForTerminal(theme);
|
|
327242
327276
|
break;
|
|
@@ -327259,14 +327293,14 @@ async function setupTerminal(theme) {
|
|
|
327259
327293
|
break;
|
|
327260
327294
|
}
|
|
327261
327295
|
saveGlobalConfig((current) => {
|
|
327262
|
-
if (["vscode", "cursor", "windsurf", "alacritty", "zed"].includes(
|
|
327296
|
+
if (["vscode", "cursor", "windsurf", "alacritty", "zed"].includes(env2.terminal ?? "")) {
|
|
327263
327297
|
if (current.shiftEnterKeyBindingInstalled === true)
|
|
327264
327298
|
return current;
|
|
327265
327299
|
return {
|
|
327266
327300
|
...current,
|
|
327267
327301
|
shiftEnterKeyBindingInstalled: true
|
|
327268
327302
|
};
|
|
327269
|
-
} else if (
|
|
327303
|
+
} else if (env2.terminal === "Apple_Terminal") {
|
|
327270
327304
|
if (current.optionAsMetaKeyInstalled === true)
|
|
327271
327305
|
return current;
|
|
327272
327306
|
return {
|
|
@@ -327296,15 +327330,15 @@ function markBackslashReturnUsed() {
|
|
|
327296
327330
|
}
|
|
327297
327331
|
}
|
|
327298
327332
|
async function call5(onDone, context3, _args) {
|
|
327299
|
-
if (
|
|
327300
|
-
const message = `Shift+Enter is natively supported in ${NATIVE_CSIU_TERMINALS[
|
|
327333
|
+
if (env2.terminal && env2.terminal in NATIVE_CSIU_TERMINALS) {
|
|
327334
|
+
const message = `Shift+Enter is natively supported in ${NATIVE_CSIU_TERMINALS[env2.terminal]}.
|
|
327301
327335
|
|
|
327302
327336
|
No configuration needed. Just use Shift+Enter to add newlines.`;
|
|
327303
327337
|
onDone(message);
|
|
327304
327338
|
return null;
|
|
327305
327339
|
}
|
|
327306
327340
|
if (!shouldOfferTerminalSetup()) {
|
|
327307
|
-
const terminalName =
|
|
327341
|
+
const terminalName = env2.terminal || "your current terminal";
|
|
327308
327342
|
const currentPlatform = getPlatform();
|
|
327309
327343
|
let platformTerminals = "";
|
|
327310
327344
|
if (currentPlatform === "macos") {
|
|
@@ -331658,10 +331692,10 @@ function Feedback({
|
|
|
331658
331692
|
message_count: messages.length,
|
|
331659
331693
|
datetime: new Date().toISOString(),
|
|
331660
331694
|
description,
|
|
331661
|
-
platform:
|
|
331695
|
+
platform: env2.platform,
|
|
331662
331696
|
gitRepo: envInfo.isGit,
|
|
331663
|
-
terminal:
|
|
331664
|
-
version: "1.
|
|
331697
|
+
terminal: env2.terminal,
|
|
331698
|
+
version: "1.16.1",
|
|
331665
331699
|
transcript: normalizeMessagesForAPI(messages),
|
|
331666
331700
|
errors: sanitizedErrors,
|
|
331667
331701
|
lastApiRequest: getLastAPIRequest(),
|
|
@@ -331849,11 +331883,11 @@ function Feedback({
|
|
|
331849
331883
|
/* @__PURE__ */ jsx_dev_runtime163.jsxDEV(ThemedText, {
|
|
331850
331884
|
dimColor: true,
|
|
331851
331885
|
children: [
|
|
331852
|
-
|
|
331886
|
+
env2.platform,
|
|
331853
331887
|
", ",
|
|
331854
|
-
|
|
331888
|
+
env2.terminal,
|
|
331855
331889
|
", v",
|
|
331856
|
-
"1.
|
|
331890
|
+
"1.16.1"
|
|
331857
331891
|
]
|
|
331858
331892
|
}, undefined, true, undefined, this)
|
|
331859
331893
|
]
|
|
@@ -331957,9 +331991,9 @@ function createGitHubIssueUrl(feedbackId, title, description, errors4) {
|
|
|
331957
331991
|
${sanitizedDescription}
|
|
331958
331992
|
|
|
331959
331993
|
` + `**Environment Info**
|
|
331960
|
-
` + `- Platform: ${
|
|
331961
|
-
` + `- Terminal: ${
|
|
331962
|
-
` + `- Version: ${"1.
|
|
331994
|
+
` + `- Platform: ${env2.platform}
|
|
331995
|
+
` + `- Terminal: ${env2.terminal}
|
|
331996
|
+
` + `- Version: ${"1.16.1"}
|
|
331963
331997
|
` + `- Feedback ID: ${feedbackId}
|
|
331964
331998
|
` + `
|
|
331965
331999
|
**Errors**
|
|
@@ -335069,7 +335103,7 @@ function buildPrimarySection() {
|
|
|
335069
335103
|
}, undefined, false, undefined, this);
|
|
335070
335104
|
return [{
|
|
335071
335105
|
label: "Version",
|
|
335072
|
-
value: "1.
|
|
335106
|
+
value: "1.16.1"
|
|
335073
335107
|
}, {
|
|
335074
335108
|
label: "Session name",
|
|
335075
335109
|
value: nameValue
|
|
@@ -338347,7 +338381,7 @@ function Config({
|
|
|
338347
338381
|
}
|
|
338348
338382
|
}, undefined, false, undefined, this)
|
|
338349
338383
|
}, undefined, false, undefined, this) : showSubmenu === "ChannelDowngrade" ? /* @__PURE__ */ jsx_dev_runtime177.jsxDEV(ChannelDowngradeDialog, {
|
|
338350
|
-
currentVersion: "1.
|
|
338384
|
+
currentVersion: "1.16.1",
|
|
338351
338385
|
onChoice: (choice) => {
|
|
338352
338386
|
setShowSubmenu(null);
|
|
338353
338387
|
setTabsHidden(false);
|
|
@@ -338359,7 +338393,7 @@ function Config({
|
|
|
338359
338393
|
autoUpdatesChannel: "stable"
|
|
338360
338394
|
};
|
|
338361
338395
|
if (choice === "stay") {
|
|
338362
|
-
newSettings.minimumVersion = "1.
|
|
338396
|
+
newSettings.minimumVersion = "1.16.1";
|
|
338363
338397
|
}
|
|
338364
338398
|
updateSettingsForSource("userSettings", newSettings);
|
|
338365
338399
|
setSettingsData((prev_27) => ({
|
|
@@ -345711,7 +345745,7 @@ function isVimModeEnabled() {
|
|
|
345711
345745
|
return config3.editorMode === "vim";
|
|
345712
345746
|
}
|
|
345713
345747
|
function getNewlineInstructions() {
|
|
345714
|
-
if (
|
|
345748
|
+
if (env2.terminal === "Apple_Terminal" && process.platform === "darwin") {
|
|
345715
345749
|
return "option + \u23CE for newline";
|
|
345716
345750
|
}
|
|
345717
345751
|
if (isShiftEnterKeyBindingInstalled()) {
|
|
@@ -346429,7 +346463,7 @@ function HelpV2(t0) {
|
|
|
346429
346463
|
let t6;
|
|
346430
346464
|
if ($3[31] !== tabs) {
|
|
346431
346465
|
t6 = /* @__PURE__ */ jsx_dev_runtime204.jsxDEV(Tabs, {
|
|
346432
|
-
title: `UR v${"1.
|
|
346466
|
+
title: `UR v${"1.16.1"}`,
|
|
346433
346467
|
color: "professionalBlue",
|
|
346434
346468
|
defaultTab: "general",
|
|
346435
346469
|
children: tabs
|
|
@@ -366393,7 +366427,7 @@ function getAllReleaseNotes(changelogContent = getStoredChangelogFromMemory()) {
|
|
|
366393
366427
|
return [];
|
|
366394
366428
|
}
|
|
366395
366429
|
}
|
|
366396
|
-
async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.
|
|
366430
|
+
async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.16.1") {
|
|
366397
366431
|
if (process.env.USER_TYPE === "ant") {
|
|
366398
366432
|
const changelog = "";
|
|
366399
366433
|
if (changelog) {
|
|
@@ -366420,7 +366454,7 @@ async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.15.0")
|
|
|
366420
366454
|
releaseNotes
|
|
366421
366455
|
};
|
|
366422
366456
|
}
|
|
366423
|
-
function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "1.
|
|
366457
|
+
function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "1.16.1") {
|
|
366424
366458
|
if (process.env.USER_TYPE === "ant") {
|
|
366425
366459
|
const changelog = "";
|
|
366426
366460
|
if (changelog) {
|
|
@@ -367590,7 +367624,7 @@ function getRecentActivitySync() {
|
|
|
367590
367624
|
return cachedActivity;
|
|
367591
367625
|
}
|
|
367592
367626
|
function getLogoDisplayData() {
|
|
367593
|
-
const version2 = process.env.DEMO_VERSION ?? "1.
|
|
367627
|
+
const version2 = process.env.DEMO_VERSION ?? "1.16.1";
|
|
367594
367628
|
const serverUrl = getDirectConnectServerUrl();
|
|
367595
367629
|
const displayPath = process.env.DEMO_VERSION ? "/code/ur" : getDisplayPath(getCwd());
|
|
367596
367630
|
const cwd2 = serverUrl ? `${displayPath} in ${serverUrl.replace(/^https?:\/\//, "")}` : displayPath;
|
|
@@ -368379,7 +368413,7 @@ function LogoV2() {
|
|
|
368379
368413
|
if ($3[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
368380
368414
|
t2 = () => {
|
|
368381
368415
|
const currentConfig = getGlobalConfig();
|
|
368382
|
-
if (currentConfig.lastReleaseNotesSeen === "1.
|
|
368416
|
+
if (currentConfig.lastReleaseNotesSeen === "1.16.1") {
|
|
368383
368417
|
return;
|
|
368384
368418
|
}
|
|
368385
368419
|
saveGlobalConfig(_temp326);
|
|
@@ -369064,12 +369098,12 @@ function LogoV2() {
|
|
|
369064
369098
|
return t41;
|
|
369065
369099
|
}
|
|
369066
369100
|
function _temp326(current) {
|
|
369067
|
-
if (current.lastReleaseNotesSeen === "1.
|
|
369101
|
+
if (current.lastReleaseNotesSeen === "1.16.1") {
|
|
369068
369102
|
return current;
|
|
369069
369103
|
}
|
|
369070
369104
|
return {
|
|
369071
369105
|
...current,
|
|
369072
|
-
lastReleaseNotesSeen: "1.
|
|
369106
|
+
lastReleaseNotesSeen: "1.16.1"
|
|
369073
369107
|
};
|
|
369074
369108
|
}
|
|
369075
369109
|
function _temp243(s_0) {
|
|
@@ -388767,20 +388801,12 @@ var init_route2 = __esm(() => {
|
|
|
388767
388801
|
// src/commands/model-doctor/model-doctor.ts
|
|
388768
388802
|
var exports_model_doctor = {};
|
|
388769
388803
|
__export(exports_model_doctor, {
|
|
388770
|
-
normalizeOllamaBaseUrl: () => normalizeOllamaBaseUrl,
|
|
388771
388804
|
listModelCapabilities: () => listModelCapabilities,
|
|
388772
388805
|
call: () => call63,
|
|
388773
388806
|
buildOllamaShowRequestBody: () => buildOllamaShowRequestBody
|
|
388774
388807
|
});
|
|
388775
388808
|
import { request as httpRequest } from "http";
|
|
388776
388809
|
import { request as httpsRequest } from "https";
|
|
388777
|
-
function normalizeOllamaBaseUrl(value) {
|
|
388778
|
-
const base2 = value?.trim() || "http://localhost:11434";
|
|
388779
|
-
return base2.replace(/\/api\/?$/, "").replace(/\/$/, "");
|
|
388780
|
-
}
|
|
388781
|
-
function getOllamaBaseUrl3() {
|
|
388782
|
-
return normalizeOllamaBaseUrl(process.env.OLLAMA_HOST);
|
|
388783
|
-
}
|
|
388784
388810
|
async function fetchJson(path22, options2 = {}) {
|
|
388785
388811
|
return new Promise((resolve43) => {
|
|
388786
388812
|
let settled = false;
|
|
@@ -388790,7 +388816,7 @@ async function fetchJson(path22, options2 = {}) {
|
|
|
388790
388816
|
settled = true;
|
|
388791
388817
|
resolve43(value);
|
|
388792
388818
|
};
|
|
388793
|
-
const url3 = new URL(path22,
|
|
388819
|
+
const url3 = new URL(path22, getOllamaBaseUrl());
|
|
388794
388820
|
const request = url3.protocol === "https:" ? httpsRequest : httpRequest;
|
|
388795
388821
|
const req = request(url3, {
|
|
388796
388822
|
method: options2.method ?? "GET",
|
|
@@ -388879,9 +388905,9 @@ function formatBytes(size) {
|
|
|
388879
388905
|
}
|
|
388880
388906
|
function formatReport(models) {
|
|
388881
388907
|
if (models.length === 0) {
|
|
388882
|
-
return `No Ollama models found at ${
|
|
388908
|
+
return `No Ollama models found at ${getOllamaBaseUrl()}. Start Ollama or pull a model, then run \`ur model-doctor\` again.`;
|
|
388883
388909
|
}
|
|
388884
|
-
const lines = [`Ollama model capability report`, `Endpoint: ${
|
|
388910
|
+
const lines = [`Ollama model capability report`, `Endpoint: ${getOllamaBaseUrl()}`, ""];
|
|
388885
388911
|
for (const model of models) {
|
|
388886
388912
|
lines.push(model.name);
|
|
388887
388913
|
lines.push(` Family: ${model.family ?? "unknown"}`);
|
|
@@ -388902,7 +388928,7 @@ async function listModelCapabilities(requestedModel) {
|
|
|
388902
388928
|
const modelTags = tags?.models ?? [];
|
|
388903
388929
|
const selected = requestedModel ? modelTags.filter((model) => normalizeName(model) === requestedModel) : modelTags;
|
|
388904
388930
|
const models = await Promise.all(selected.map(inspectModel));
|
|
388905
|
-
return { endpoint:
|
|
388931
|
+
return { endpoint: getOllamaBaseUrl(), models };
|
|
388906
388932
|
}
|
|
388907
388933
|
var call63 = async (args) => {
|
|
388908
388934
|
const tokens = parseArguments2(args);
|
|
@@ -388916,6 +388942,7 @@ var call63 = async (args) => {
|
|
|
388916
388942
|
};
|
|
388917
388943
|
var init_model_doctor = __esm(() => {
|
|
388918
388944
|
init_argumentSubstitution();
|
|
388945
|
+
init_ollamaConfig();
|
|
388919
388946
|
});
|
|
388920
388947
|
|
|
388921
388948
|
// src/services/agents/modelRouter.ts
|
|
@@ -389077,8 +389104,7 @@ var init_model_route2 = __esm(() => {
|
|
|
389077
389104
|
|
|
389078
389105
|
// src/services/agents/embeddings.ts
|
|
389079
389106
|
function getOllamaEmbedBaseUrl(env4 = process.env) {
|
|
389080
|
-
|
|
389081
|
-
return /^https?:\/\//.test(raw) ? raw : `http://${raw}`;
|
|
389107
|
+
return getOllamaBaseUrl(env4);
|
|
389082
389108
|
}
|
|
389083
389109
|
function cosineSimilarity2(a2, b) {
|
|
389084
389110
|
const length = Math.min(a2.length, b.length);
|
|
@@ -389114,6 +389140,9 @@ function makeOllamaEmbedder(model = DEFAULT_EMBED_MODEL2, baseUrl = getOllamaEmb
|
|
|
389114
389140
|
};
|
|
389115
389141
|
}
|
|
389116
389142
|
var DEFAULT_EMBED_MODEL2 = "nomic-embed-text";
|
|
389143
|
+
var init_embeddings2 = __esm(() => {
|
|
389144
|
+
init_ollamaConfig();
|
|
389145
|
+
});
|
|
389117
389146
|
|
|
389118
389147
|
// src/services/agents/knowledge.ts
|
|
389119
389148
|
import {
|
|
@@ -389415,6 +389444,7 @@ ${result.text}`).join(`
|
|
|
389415
389444
|
var TEXT_EXT_RE, SECRET_FILE_RE, MAX_DIR_FILES = 200, MAX_CHUNK_CHARS = 1600;
|
|
389416
389445
|
var init_knowledge = __esm(() => {
|
|
389417
389446
|
init_json();
|
|
389447
|
+
init_embeddings2();
|
|
389418
389448
|
TEXT_EXT_RE = /\.(md|mdx|markdown|txt|rst|adoc)$/i;
|
|
389419
389449
|
SECRET_FILE_RE = /(^|\/)\.env(\.|$)|secrets?\.|\.pem$|\.key$/i;
|
|
389420
389450
|
});
|
|
@@ -389534,6 +389564,7 @@ var call65 = async (args) => {
|
|
|
389534
389564
|
};
|
|
389535
389565
|
};
|
|
389536
389566
|
var init_knowledge2 = __esm(() => {
|
|
389567
|
+
init_embeddings2();
|
|
389537
389568
|
init_knowledge();
|
|
389538
389569
|
init_argumentSubstitution();
|
|
389539
389570
|
init_cwd2();
|
|
@@ -394042,7 +394073,7 @@ function workspaceInfo(cwd2) {
|
|
|
394042
394073
|
}
|
|
394043
394074
|
async function urDoctor(cwd2) {
|
|
394044
394075
|
const lines = ["UR doctor", "", osInfo(), ""];
|
|
394045
|
-
const host =
|
|
394076
|
+
const host = getOllamaBaseUrl();
|
|
394046
394077
|
let ollama;
|
|
394047
394078
|
let ollamaModels = [];
|
|
394048
394079
|
try {
|
|
@@ -394080,6 +394111,7 @@ var init_sysinfo = __esm(() => {
|
|
|
394080
394111
|
init_projectDna();
|
|
394081
394112
|
init_ollamaModels();
|
|
394082
394113
|
init_ollamaRouter();
|
|
394114
|
+
init_ollamaConfig();
|
|
394083
394115
|
});
|
|
394084
394116
|
|
|
394085
394117
|
// src/commands/os/os.ts
|
|
@@ -396249,8 +396281,8 @@ var init_terminalSetup2 = __esm(() => {
|
|
|
396249
396281
|
terminalSetup = {
|
|
396250
396282
|
type: "local-jsx",
|
|
396251
396283
|
name: "terminal-setup",
|
|
396252
|
-
description:
|
|
396253
|
-
isHidden:
|
|
396284
|
+
description: env2.terminal === "Apple_Terminal" ? "Enable Option+Enter key binding for newlines and visual bell" : "Install Shift+Enter key binding for newlines",
|
|
396285
|
+
isHidden: env2.terminal !== null && env2.terminal in NATIVE_CSIU_TERMINALS2,
|
|
396254
396286
|
load: () => Promise.resolve().then(() => (init_terminalSetup(), exports_terminalSetup))
|
|
396255
396287
|
};
|
|
396256
396288
|
terminalSetup_default = terminalSetup;
|
|
@@ -409593,7 +409625,7 @@ async function captureMemoryDiagnostics(trigger2, dumpNumber = 0) {
|
|
|
409593
409625
|
smapsRollup,
|
|
409594
409626
|
platform: process.platform,
|
|
409595
409627
|
nodeVersion: process.version,
|
|
409596
|
-
ccVersion: "1.
|
|
409628
|
+
ccVersion: "1.16.1"
|
|
409597
409629
|
};
|
|
409598
409630
|
}
|
|
409599
409631
|
async function performHeapDump(trigger2 = "manual", dumpNumber = 0) {
|
|
@@ -410179,7 +410211,7 @@ var init_bridge_kick = __esm(() => {
|
|
|
410179
410211
|
var call126 = async () => {
|
|
410180
410212
|
return {
|
|
410181
410213
|
type: "text",
|
|
410182
|
-
value: "1.
|
|
410214
|
+
value: "1.16.1"
|
|
410183
410215
|
};
|
|
410184
410216
|
}, version2, version_default;
|
|
410185
410217
|
var init_version = __esm(() => {
|
|
@@ -412098,7 +412130,7 @@ var import_compiler_runtime261, import_react184, jsx_dev_runtime339, CHROME_EXTE
|
|
|
412098
412130
|
const isExtensionInstalled = await isChromeExtensionInstalled();
|
|
412099
412131
|
const config3 = getGlobalConfig();
|
|
412100
412132
|
const isSubscriber = isURAISubscriber2();
|
|
412101
|
-
const isWSL =
|
|
412133
|
+
const isWSL = env2.isWslEnvironment();
|
|
412102
412134
|
return /* @__PURE__ */ jsx_dev_runtime339.jsxDEV(URInChromeMenu, {
|
|
412103
412135
|
onDone,
|
|
412104
412136
|
isExtensionInstalled,
|
|
@@ -419234,7 +419266,7 @@ function generateHtmlReport(data, insights) {
|
|
|
419234
419266
|
</html>`;
|
|
419235
419267
|
}
|
|
419236
419268
|
function buildExportData(data, insights, facets, remoteStats) {
|
|
419237
|
-
const version3 = typeof MACRO !== "undefined" ? "1.
|
|
419269
|
+
const version3 = typeof MACRO !== "undefined" ? "1.16.1" : "unknown";
|
|
419238
419270
|
const remote_hosts_collected = remoteStats?.hosts.filter((h2) => h2.sessionCount > 0).map((h2) => h2.name);
|
|
419239
419271
|
const facets_summary = {
|
|
419240
419272
|
total: facets.size,
|
|
@@ -423487,7 +423519,7 @@ var init_sessionStorage = __esm(() => {
|
|
|
423487
423519
|
init_settings2();
|
|
423488
423520
|
init_slowOperations();
|
|
423489
423521
|
init_uuid();
|
|
423490
|
-
VERSION5 = typeof MACRO !== "undefined" ? "1.
|
|
423522
|
+
VERSION5 = typeof MACRO !== "undefined" ? "1.16.1" : "unknown";
|
|
423491
423523
|
MAX_TOMBSTONE_REWRITE_BYTES = 50 * 1024 * 1024;
|
|
423492
423524
|
SKIP_FIRST_PROMPT_PATTERN = /^(?:\s*<[a-z][\w-]*[\s>]|\[Request interrupted by user[^\]]*\])/;
|
|
423493
423525
|
EPHEMERAL_PROGRESS_TYPES = new Set([
|
|
@@ -424692,7 +424724,7 @@ var init_filesystem = __esm(() => {
|
|
|
424692
424724
|
});
|
|
424693
424725
|
getBundledSkillsRoot = memoize_default(function getBundledSkillsRoot2() {
|
|
424694
424726
|
const nonce = randomBytes18(16).toString("hex");
|
|
424695
|
-
return join178(getURTempDir(), "bundled-skills", "1.
|
|
424727
|
+
return join178(getURTempDir(), "bundled-skills", "1.16.1", nonce);
|
|
424696
424728
|
});
|
|
424697
424729
|
getResolvedWorkingDirPaths = memoize_default(getPathsForPermissionCheck);
|
|
424698
424730
|
});
|
|
@@ -430121,7 +430153,7 @@ Assistant knowledge cutoff is ${cutoff}.` : "";
|
|
|
430121
430153
|
<env>
|
|
430122
430154
|
Working directory: ${getCwd()}
|
|
430123
430155
|
Is directory a git repo: ${isGit ? "Yes" : "No"}
|
|
430124
|
-
${additionalDirsInfo}Platform: ${
|
|
430156
|
+
${additionalDirsInfo}Platform: ${env2.platform}
|
|
430125
430157
|
${getShellInfoLine()}
|
|
430126
430158
|
OS Version: ${unameSR}
|
|
430127
430159
|
</env>
|
|
@@ -430145,7 +430177,7 @@ async function computeSimpleEnvInfo(modelId, additionalWorkingDirectories) {
|
|
|
430145
430177
|
[`Is a git repository: ${isGit}`],
|
|
430146
430178
|
additionalWorkingDirectories && additionalWorkingDirectories.length > 0 ? `Additional working directories:` : null,
|
|
430147
430179
|
additionalWorkingDirectories && additionalWorkingDirectories.length > 0 ? additionalWorkingDirectories : null,
|
|
430148
|
-
`Platform: ${
|
|
430180
|
+
`Platform: ${env2.platform}`,
|
|
430149
430181
|
getShellInfoLine(),
|
|
430150
430182
|
`OS Version: ${unameSR}`,
|
|
430151
430183
|
modelDescription,
|
|
@@ -430179,13 +430211,13 @@ function getKnowledgeCutoff(modelId) {
|
|
|
430179
430211
|
function getShellInfoLine() {
|
|
430180
430212
|
const shell = process.env.SHELL || "unknown";
|
|
430181
430213
|
const shellName = shell.includes("zsh") ? "zsh" : shell.includes("bash") ? "bash" : shell;
|
|
430182
|
-
if (
|
|
430214
|
+
if (env2.platform === "win32") {
|
|
430183
430215
|
return `Shell: ${shellName} (use Unix shell syntax, not Windows \u2014 e.g., /dev/null not NUL, forward slashes in paths)`;
|
|
430184
430216
|
}
|
|
430185
430217
|
return `Shell: ${shellName}`;
|
|
430186
430218
|
}
|
|
430187
430219
|
function getUnameSR() {
|
|
430188
|
-
if (
|
|
430220
|
+
if (env2.platform === "win32") {
|
|
430189
430221
|
return `${osVersion()} ${osRelease2()}`;
|
|
430190
430222
|
}
|
|
430191
430223
|
return `${osType2()} ${osRelease2()}`;
|
|
@@ -430723,7 +430755,7 @@ function computeFingerprint(messageText, version3) {
|
|
|
430723
430755
|
}
|
|
430724
430756
|
function computeFingerprintFromMessages(messages) {
|
|
430725
430757
|
const firstMessageText = extractFirstMessageText(messages);
|
|
430726
|
-
return computeFingerprint(firstMessageText, "1.
|
|
430758
|
+
return computeFingerprint(firstMessageText, "1.16.1");
|
|
430727
430759
|
}
|
|
430728
430760
|
var FINGERPRINT_SALT = "59cf53e54c78";
|
|
430729
430761
|
var init_fingerprint = () => {};
|
|
@@ -432589,7 +432621,7 @@ async function sideQuery(opts) {
|
|
|
432589
432621
|
betas.push(STRUCTURED_OUTPUTS_BETA_HEADER);
|
|
432590
432622
|
}
|
|
432591
432623
|
const messageText = extractFirstUserMessageText(messages);
|
|
432592
|
-
const fingerprint = computeFingerprint(messageText, "1.
|
|
432624
|
+
const fingerprint = computeFingerprint(messageText, "1.16.1");
|
|
432593
432625
|
const attributionHeader = getAttributionHeader(fingerprint);
|
|
432594
432626
|
const systemBlocks = [
|
|
432595
432627
|
attributionHeader ? { type: "text", text: attributionHeader } : null,
|
|
@@ -437326,7 +437358,7 @@ function buildSystemInitMessage(inputs) {
|
|
|
437326
437358
|
slash_commands: inputs.commands.filter((c4) => c4.userInvocable !== false).map((c4) => c4.name),
|
|
437327
437359
|
apiKeySource: getURHQApiKeyWithSource().source,
|
|
437328
437360
|
betas: getSdkBetas(),
|
|
437329
|
-
ur_version: "1.
|
|
437361
|
+
ur_version: "1.16.1",
|
|
437330
437362
|
output_style: outputStyle2,
|
|
437331
437363
|
agents: inputs.agents.map((agent) => agent.agentType),
|
|
437332
437364
|
skills: inputs.skills.filter((s) => s.userInvocable !== false).map((skill) => skill.name),
|
|
@@ -441895,7 +441927,7 @@ function usePermissionRequestLogging(toolUseConfirm, unaryEvent) {
|
|
|
441895
441927
|
metadata: {
|
|
441896
441928
|
language_name: unaryEvent.language_name,
|
|
441897
441929
|
message_id: toolUseConfirm.assistantMessage.message.id,
|
|
441898
|
-
platform:
|
|
441930
|
+
platform: env2.platform
|
|
441899
441931
|
}
|
|
441900
441932
|
});
|
|
441901
441933
|
}, [toolUseConfirm, unaryEvent, setAppState]);
|
|
@@ -443876,7 +443908,7 @@ function logPermissionEvent(event, completionType, languageName, messageId, hasF
|
|
|
443876
443908
|
metadata: {
|
|
443877
443909
|
language_name: languageName,
|
|
443878
443910
|
message_id: messageId,
|
|
443879
|
-
platform:
|
|
443911
|
+
platform: env2.platform,
|
|
443880
443912
|
hasFeedback: hasFeedback ?? false
|
|
443881
443913
|
}
|
|
443882
443914
|
});
|
|
@@ -446698,7 +446730,7 @@ function FallbackPermissionRequest(t0) {
|
|
|
446698
446730
|
metadata: {
|
|
446699
446731
|
language_name: "none",
|
|
446700
446732
|
message_id: toolUseConfirm.assistantMessage.message.id,
|
|
446701
|
-
platform:
|
|
446733
|
+
platform: env2.platform
|
|
446702
446734
|
}
|
|
446703
446735
|
});
|
|
446704
446736
|
toolUseConfirm.onAllow(toolUseConfirm.input, [], feedback2);
|
|
@@ -446712,7 +446744,7 @@ function FallbackPermissionRequest(t0) {
|
|
|
446712
446744
|
metadata: {
|
|
446713
446745
|
language_name: "none",
|
|
446714
446746
|
message_id: toolUseConfirm.assistantMessage.message.id,
|
|
446715
|
-
platform:
|
|
446747
|
+
platform: env2.platform
|
|
446716
446748
|
}
|
|
446717
446749
|
});
|
|
446718
446750
|
toolUseConfirm.onAllow(toolUseConfirm.input, [{
|
|
@@ -446733,7 +446765,7 @@ function FallbackPermissionRequest(t0) {
|
|
|
446733
446765
|
metadata: {
|
|
446734
446766
|
language_name: "none",
|
|
446735
446767
|
message_id: toolUseConfirm.assistantMessage.message.id,
|
|
446736
|
-
platform:
|
|
446768
|
+
platform: env2.platform
|
|
446737
446769
|
}
|
|
446738
446770
|
});
|
|
446739
446771
|
toolUseConfirm.onReject(feedback2);
|
|
@@ -446759,7 +446791,7 @@ function FallbackPermissionRequest(t0) {
|
|
|
446759
446791
|
metadata: {
|
|
446760
446792
|
language_name: "none",
|
|
446761
446793
|
message_id: toolUseConfirm.assistantMessage.message.id,
|
|
446762
|
-
platform:
|
|
446794
|
+
platform: env2.platform
|
|
446763
446795
|
}
|
|
446764
446796
|
});
|
|
446765
446797
|
toolUseConfirm.onReject();
|
|
@@ -448955,7 +448987,7 @@ function SkillPermissionRequest(props) {
|
|
|
448955
448987
|
metadata: {
|
|
448956
448988
|
language_name: "none",
|
|
448957
448989
|
message_id: toolUseConfirm.assistantMessage.message.id,
|
|
448958
|
-
platform:
|
|
448990
|
+
platform: env2.platform
|
|
448959
448991
|
}
|
|
448960
448992
|
});
|
|
448961
448993
|
toolUseConfirm.onAllow(toolUseConfirm.input, [], feedback2);
|
|
@@ -448969,7 +449001,7 @@ function SkillPermissionRequest(props) {
|
|
|
448969
449001
|
metadata: {
|
|
448970
449002
|
language_name: "none",
|
|
448971
449003
|
message_id: toolUseConfirm.assistantMessage.message.id,
|
|
448972
|
-
platform:
|
|
449004
|
+
platform: env2.platform
|
|
448973
449005
|
}
|
|
448974
449006
|
});
|
|
448975
449007
|
toolUseConfirm.onAllow(toolUseConfirm.input, [{
|
|
@@ -448991,7 +449023,7 @@ function SkillPermissionRequest(props) {
|
|
|
448991
449023
|
metadata: {
|
|
448992
449024
|
language_name: "none",
|
|
448993
449025
|
message_id: toolUseConfirm.assistantMessage.message.id,
|
|
448994
|
-
platform:
|
|
449026
|
+
platform: env2.platform
|
|
448995
449027
|
}
|
|
448996
449028
|
});
|
|
448997
449029
|
const spaceIndex_0 = skill.indexOf(" ");
|
|
@@ -449015,7 +449047,7 @@ function SkillPermissionRequest(props) {
|
|
|
449015
449047
|
metadata: {
|
|
449016
449048
|
language_name: "none",
|
|
449017
449049
|
message_id: toolUseConfirm.assistantMessage.message.id,
|
|
449018
|
-
platform:
|
|
449050
|
+
platform: env2.platform
|
|
449019
449051
|
}
|
|
449020
449052
|
});
|
|
449021
449053
|
toolUseConfirm.onReject(feedback2);
|
|
@@ -449042,7 +449074,7 @@ function SkillPermissionRequest(props) {
|
|
|
449042
449074
|
metadata: {
|
|
449043
449075
|
language_name: "none",
|
|
449044
449076
|
message_id: toolUseConfirm.assistantMessage.message.id,
|
|
449045
|
-
platform:
|
|
449077
|
+
platform: env2.platform
|
|
449046
449078
|
}
|
|
449047
449079
|
});
|
|
449048
449080
|
toolUseConfirm.onReject();
|
|
@@ -451954,7 +451986,7 @@ var init_useVoiceEnabled = __esm(() => {
|
|
|
451954
451986
|
function getSemverPart(version3) {
|
|
451955
451987
|
return `${import_semver13.major(version3, { loose: true })}.${import_semver13.minor(version3, { loose: true })}.${import_semver13.patch(version3, { loose: true })}`;
|
|
451956
451988
|
}
|
|
451957
|
-
function useUpdateNotification(updatedVersion, initialVersion = "1.
|
|
451989
|
+
function useUpdateNotification(updatedVersion, initialVersion = "1.16.1") {
|
|
451958
451990
|
const [lastNotifiedSemver, setLastNotifiedSemver] = import_react224.useState(() => getSemverPart(initialVersion));
|
|
451959
451991
|
if (!updatedVersion) {
|
|
451960
451992
|
return null;
|
|
@@ -452003,7 +452035,7 @@ function AutoUpdater({
|
|
|
452003
452035
|
return;
|
|
452004
452036
|
}
|
|
452005
452037
|
if (false) {}
|
|
452006
|
-
const currentVersion = "1.
|
|
452038
|
+
const currentVersion = "1.16.1";
|
|
452007
452039
|
const channel = getInitialSettings()?.autoUpdatesChannel ?? "latest";
|
|
452008
452040
|
let latestVersion = await getLatestVersion(channel);
|
|
452009
452041
|
const isDisabled = isAutoUpdaterDisabled();
|
|
@@ -452232,12 +452264,12 @@ function NativeAutoUpdater({
|
|
|
452232
452264
|
logEvent("tengu_native_auto_updater_start", {});
|
|
452233
452265
|
try {
|
|
452234
452266
|
const maxVersion = await getMaxVersion();
|
|
452235
|
-
if (maxVersion && gt("1.
|
|
452267
|
+
if (maxVersion && gt("1.16.1", maxVersion)) {
|
|
452236
452268
|
const msg = await getMaxVersionMessage();
|
|
452237
452269
|
setMaxVersionIssue(msg ?? "affects your version");
|
|
452238
452270
|
}
|
|
452239
452271
|
const result = await installLatest(channel);
|
|
452240
|
-
const currentVersion = "1.
|
|
452272
|
+
const currentVersion = "1.16.1";
|
|
452241
452273
|
const latencyMs = Date.now() - startTime;
|
|
452242
452274
|
if (result.lockFailed) {
|
|
452243
452275
|
logEvent("tengu_native_auto_updater_lock_contention", {
|
|
@@ -452374,17 +452406,17 @@ function PackageManagerAutoUpdater(t0) {
|
|
|
452374
452406
|
const maxVersion = await getMaxVersion();
|
|
452375
452407
|
if (maxVersion && latest && gt(latest, maxVersion)) {
|
|
452376
452408
|
logForDebugging(`PackageManagerAutoUpdater: maxVersion ${maxVersion} is set, capping update from ${latest} to ${maxVersion}`);
|
|
452377
|
-
if (gte("1.
|
|
452378
|
-
logForDebugging(`PackageManagerAutoUpdater: current version ${"1.
|
|
452409
|
+
if (gte("1.16.1", maxVersion)) {
|
|
452410
|
+
logForDebugging(`PackageManagerAutoUpdater: current version ${"1.16.1"} is already at or above maxVersion ${maxVersion}, skipping update`);
|
|
452379
452411
|
setUpdateAvailable(false);
|
|
452380
452412
|
return;
|
|
452381
452413
|
}
|
|
452382
452414
|
latest = maxVersion;
|
|
452383
452415
|
}
|
|
452384
|
-
const hasUpdate = latest && !gte("1.
|
|
452416
|
+
const hasUpdate = latest && !gte("1.16.1", latest) && !shouldSkipVersion(latest);
|
|
452385
452417
|
setUpdateAvailable(!!hasUpdate);
|
|
452386
452418
|
if (hasUpdate) {
|
|
452387
|
-
logForDebugging(`PackageManagerAutoUpdater: Update available ${"1.
|
|
452419
|
+
logForDebugging(`PackageManagerAutoUpdater: Update available ${"1.16.1"} -> ${latest}`);
|
|
452388
452420
|
}
|
|
452389
452421
|
};
|
|
452390
452422
|
$3[0] = t1;
|
|
@@ -452418,7 +452450,7 @@ function PackageManagerAutoUpdater(t0) {
|
|
|
452418
452450
|
wrap: "truncate",
|
|
452419
452451
|
children: [
|
|
452420
452452
|
"currentVersion: ",
|
|
452421
|
-
"1.
|
|
452453
|
+
"1.16.1"
|
|
452422
452454
|
]
|
|
452423
452455
|
}, undefined, true, undefined, this);
|
|
452424
452456
|
$3[3] = verbose;
|
|
@@ -464780,7 +464812,7 @@ function buildStatusLineCommandInput(permissionMode, exceeds200kTokens, settings
|
|
|
464780
464812
|
project_dir: getOriginalCwd(),
|
|
464781
464813
|
added_dirs: addedDirs
|
|
464782
464814
|
},
|
|
464783
|
-
version: "1.
|
|
464815
|
+
version: "1.16.1",
|
|
464784
464816
|
output_style: {
|
|
464785
464817
|
name: outputStyleName
|
|
464786
464818
|
},
|
|
@@ -466901,7 +466933,7 @@ function pickDiverseCoreFiles(sortedPaths, want) {
|
|
|
466901
466933
|
async function getFrequentlyModifiedFiles() {
|
|
466902
466934
|
if (false)
|
|
466903
466935
|
;
|
|
466904
|
-
if (
|
|
466936
|
+
if (env2.platform === "win32")
|
|
466905
466937
|
return [];
|
|
466906
466938
|
if (!await getIsGit())
|
|
466907
466939
|
return [];
|
|
@@ -468188,7 +468220,7 @@ function PromptInput({
|
|
|
468188
468220
|
onImagePaste(imageData.base64, imageData.mediaType);
|
|
468189
468221
|
} else {
|
|
468190
468222
|
const shortcutDisplay = getShortcutDisplay("chat:imagePaste", "Chat", "ctrl+v");
|
|
468191
|
-
const message =
|
|
468223
|
+
const message = env2.isSSH() ? "No image found in clipboard. You're SSH'd; try scp?" : `No image found in clipboard. Copy an image (e.g. a screenshot) first, then press ${shortcutDisplay} to paste it.`;
|
|
468192
468224
|
addNotification({
|
|
468193
468225
|
key: "no-image-in-clipboard",
|
|
468194
468226
|
text: message,
|
|
@@ -475698,7 +475730,7 @@ function SessionBackgroundHint(t0) {
|
|
|
475698
475730
|
}
|
|
475699
475731
|
useKeybinding("task:background", handleBackground, t4);
|
|
475700
475732
|
const baseShortcut = useShortcutDisplay("task:background", "Task", "ctrl+b");
|
|
475701
|
-
const shortcut =
|
|
475733
|
+
const shortcut = env2.terminal === "tmux" && baseShortcut === "ctrl+b" ? "ctrl+b ctrl+b" : baseShortcut;
|
|
475702
475734
|
if (!isLoading || !showSessionHint) {
|
|
475703
475735
|
return null;
|
|
475704
475736
|
}
|
|
@@ -476288,7 +476320,7 @@ async function submitTranscriptShare(messages, trigger2, appearanceId) {
|
|
|
476288
476320
|
} catch {}
|
|
476289
476321
|
const data = {
|
|
476290
476322
|
trigger: trigger2,
|
|
476291
|
-
version: "1.
|
|
476323
|
+
version: "1.16.1",
|
|
476292
476324
|
platform: process.platform,
|
|
476293
476325
|
transcript,
|
|
476294
476326
|
subagentTranscripts: Object.keys(subagentTranscripts).length > 0 ? subagentTranscripts : undefined,
|
|
@@ -478302,11 +478334,11 @@ var init_tipRegistry = __esm(() => {
|
|
|
478302
478334
|
},
|
|
478303
478335
|
{
|
|
478304
478336
|
id: "terminal-setup",
|
|
478305
|
-
content: async () =>
|
|
478337
|
+
content: async () => env2.terminal === "Apple_Terminal" ? "Run /terminal-setup to enable convenient terminal integration like Option + Enter for new line and more" : "Run /terminal-setup to enable convenient terminal integration like Shift + Enter for new line and more",
|
|
478306
478338
|
cooldownSessions: 10,
|
|
478307
478339
|
async isRelevant() {
|
|
478308
478340
|
const config3 = getGlobalConfig();
|
|
478309
|
-
if (
|
|
478341
|
+
if (env2.terminal === "Apple_Terminal") {
|
|
478310
478342
|
return !config3.optionAsMetaKeyInstalled;
|
|
478311
478343
|
}
|
|
478312
478344
|
return !config3.shiftEnterKeyBindingInstalled;
|
|
@@ -478314,23 +478346,23 @@ var init_tipRegistry = __esm(() => {
|
|
|
478314
478346
|
},
|
|
478315
478347
|
{
|
|
478316
478348
|
id: "shift-enter",
|
|
478317
|
-
content: async () =>
|
|
478349
|
+
content: async () => env2.terminal === "Apple_Terminal" ? "Press Option+Enter to send a multi-line message" : "Press Shift+Enter to send a multi-line message",
|
|
478318
478350
|
cooldownSessions: 10,
|
|
478319
478351
|
async isRelevant() {
|
|
478320
478352
|
const config3 = getGlobalConfig();
|
|
478321
|
-
return Boolean((
|
|
478353
|
+
return Boolean((env2.terminal === "Apple_Terminal" ? config3.optionAsMetaKeyInstalled : config3.shiftEnterKeyBindingInstalled) && config3.numStartups > 3);
|
|
478322
478354
|
}
|
|
478323
478355
|
},
|
|
478324
478356
|
{
|
|
478325
478357
|
id: "shift-enter-setup",
|
|
478326
|
-
content: async () =>
|
|
478358
|
+
content: async () => env2.terminal === "Apple_Terminal" ? "Run /terminal-setup to enable Option+Enter for new lines" : "Run /terminal-setup to enable Shift+Enter for new lines",
|
|
478327
478359
|
cooldownSessions: 10,
|
|
478328
478360
|
async isRelevant() {
|
|
478329
478361
|
if (!shouldOfferTerminalSetup()) {
|
|
478330
478362
|
return false;
|
|
478331
478363
|
}
|
|
478332
478364
|
const config3 = getGlobalConfig();
|
|
478333
|
-
return !(
|
|
478365
|
+
return !(env2.terminal === "Apple_Terminal" ? config3.optionAsMetaKeyInstalled : config3.shiftEnterKeyBindingInstalled);
|
|
478334
478366
|
}
|
|
478335
478367
|
},
|
|
478336
478368
|
{
|
|
@@ -478389,7 +478421,7 @@ var init_tipRegistry = __esm(() => {
|
|
|
478389
478421
|
},
|
|
478390
478422
|
{
|
|
478391
478423
|
id: "vscode-command-install",
|
|
478392
|
-
content: async () => `Open the Command Palette (Cmd+Shift+P) and run "Shell Command: Install '${
|
|
478424
|
+
content: async () => `Open the Command Palette (Cmd+Shift+P) and run "Shell Command: Install '${env2.terminal === "vscode" ? "code" : env2.terminal}' command in PATH" to enable IDE integration`,
|
|
478393
478425
|
cooldownSessions: 0,
|
|
478394
478426
|
async isRelevant() {
|
|
478395
478427
|
if (!isSupportedVSCodeTerminal()) {
|
|
@@ -478398,7 +478430,7 @@ var init_tipRegistry = __esm(() => {
|
|
|
478398
478430
|
if (getPlatform() !== "macos") {
|
|
478399
478431
|
return false;
|
|
478400
478432
|
}
|
|
478401
|
-
switch (
|
|
478433
|
+
switch (env2.terminal) {
|
|
478402
478434
|
case "vscode":
|
|
478403
478435
|
return !await isVSCodeInstalled();
|
|
478404
478436
|
case "cursor":
|
|
@@ -478451,7 +478483,7 @@ var init_tipRegistry = __esm(() => {
|
|
|
478451
478483
|
id: "drag-and-drop-images",
|
|
478452
478484
|
content: async () => "Did you know you can drag and drop image files into your terminal?",
|
|
478453
478485
|
cooldownSessions: 10,
|
|
478454
|
-
isRelevant: async () => !
|
|
478486
|
+
isRelevant: async () => !env2.isSSH()
|
|
478455
478487
|
},
|
|
478456
478488
|
{
|
|
478457
478489
|
id: "paste-images-mac",
|
|
@@ -488197,7 +488229,7 @@ function WelcomeV2() {
|
|
|
488197
488229
|
dimColor: true,
|
|
488198
488230
|
children: [
|
|
488199
488231
|
"v",
|
|
488200
|
-
"1.
|
|
488232
|
+
"1.16.1"
|
|
488201
488233
|
]
|
|
488202
488234
|
}, undefined, true, undefined, this)
|
|
488203
488235
|
]
|
|
@@ -488530,7 +488562,7 @@ function Onboarding({
|
|
|
488530
488562
|
/* @__PURE__ */ jsx_dev_runtime473.jsxDEV(Newline, {}, undefined, false, undefined, this),
|
|
488531
488563
|
"for your terminal:",
|
|
488532
488564
|
" ",
|
|
488533
|
-
|
|
488565
|
+
env2.terminal === "Apple_Terminal" ? "Option+Enter for newlines and visual bell" : "Shift+Enter for newlines"
|
|
488534
488566
|
]
|
|
488535
488567
|
}, undefined, true, undefined, this),
|
|
488536
488568
|
/* @__PURE__ */ jsx_dev_runtime473.jsxDEV(Select, {
|
|
@@ -489457,7 +489489,7 @@ function completeOnboarding() {
|
|
|
489457
489489
|
saveGlobalConfig((current) => ({
|
|
489458
489490
|
...current,
|
|
489459
489491
|
hasCompletedOnboarding: true,
|
|
489460
|
-
lastOnboardingVersion: "1.
|
|
489492
|
+
lastOnboardingVersion: "1.16.1"
|
|
489461
489493
|
}));
|
|
489462
489494
|
}
|
|
489463
489495
|
function showDialog(root2, renderer) {
|
|
@@ -493195,6 +493227,194 @@ var init_ghAuthStatus = __esm(() => {
|
|
|
493195
493227
|
init_which();
|
|
493196
493228
|
});
|
|
493197
493229
|
|
|
493230
|
+
// src/utils/model/ollamaDiscovery.ts
|
|
493231
|
+
import { networkInterfaces } from "os";
|
|
493232
|
+
import { connect as defaultConnect } from "net";
|
|
493233
|
+
function getLocalSubnetInterfaces() {
|
|
493234
|
+
const result = [];
|
|
493235
|
+
const ifaces = networkInterfaces();
|
|
493236
|
+
for (const [name, entries] of Object.entries(ifaces)) {
|
|
493237
|
+
if (!entries)
|
|
493238
|
+
continue;
|
|
493239
|
+
for (const entry of entries) {
|
|
493240
|
+
if (entry.family !== "IPv4")
|
|
493241
|
+
continue;
|
|
493242
|
+
if (entry.internal)
|
|
493243
|
+
continue;
|
|
493244
|
+
const address = entry.address;
|
|
493245
|
+
if (!address || address.startsWith("127."))
|
|
493246
|
+
continue;
|
|
493247
|
+
if (address.startsWith("169.254."))
|
|
493248
|
+
continue;
|
|
493249
|
+
result.push({
|
|
493250
|
+
name,
|
|
493251
|
+
address,
|
|
493252
|
+
prefixLength: entry.cidr ? parsePrefixLength(entry.cidr) : 24
|
|
493253
|
+
});
|
|
493254
|
+
}
|
|
493255
|
+
}
|
|
493256
|
+
return result;
|
|
493257
|
+
}
|
|
493258
|
+
function parsePrefixLength(cidr) {
|
|
493259
|
+
const slash = cidr.lastIndexOf("/");
|
|
493260
|
+
if (slash === -1)
|
|
493261
|
+
return 24;
|
|
493262
|
+
const parsed = Number.parseInt(cidr.slice(slash + 1), 10);
|
|
493263
|
+
return Number.isNaN(parsed) ? 24 : parsed;
|
|
493264
|
+
}
|
|
493265
|
+
function ipToLong(ip) {
|
|
493266
|
+
const parts = ip.split(".");
|
|
493267
|
+
if (parts.length !== 4)
|
|
493268
|
+
return 0;
|
|
493269
|
+
let value = 0;
|
|
493270
|
+
for (const part of parts) {
|
|
493271
|
+
const num = Number.parseInt(part, 10);
|
|
493272
|
+
if (Number.isNaN(num) || num < 0 || num > 255)
|
|
493273
|
+
return 0;
|
|
493274
|
+
value = value << 8 | num;
|
|
493275
|
+
}
|
|
493276
|
+
return value >>> 0;
|
|
493277
|
+
}
|
|
493278
|
+
function longToIp(value) {
|
|
493279
|
+
value = value >>> 0;
|
|
493280
|
+
return [
|
|
493281
|
+
value >>> 24 & 255,
|
|
493282
|
+
value >>> 16 & 255,
|
|
493283
|
+
value >>> 8 & 255,
|
|
493284
|
+
value & 255
|
|
493285
|
+
].join(".");
|
|
493286
|
+
}
|
|
493287
|
+
function listSubnetHosts(address, prefixLength) {
|
|
493288
|
+
const mask = prefixLength === 0 ? 0 : ~0 << 32 - prefixLength >>> 0;
|
|
493289
|
+
const network = ipToLong(address) & mask;
|
|
493290
|
+
const broadcast = network | ~mask >>> 0;
|
|
493291
|
+
const hosts = [];
|
|
493292
|
+
const start = network + 1;
|
|
493293
|
+
const end = Math.min(broadcast - 1, network + 65534);
|
|
493294
|
+
for (let ip = start;ip <= end; ip++) {
|
|
493295
|
+
hosts.push(longToIp(ip));
|
|
493296
|
+
}
|
|
493297
|
+
return hosts;
|
|
493298
|
+
}
|
|
493299
|
+
function isOllamaHostExcluded(host) {
|
|
493300
|
+
const lower = host.toLowerCase();
|
|
493301
|
+
return lower.includes("localhost") || lower.startsWith("127.") || lower === "::1";
|
|
493302
|
+
}
|
|
493303
|
+
async function probeTcpPort(host, port, timeoutMs, connect, signal) {
|
|
493304
|
+
if (signal?.aborted)
|
|
493305
|
+
return false;
|
|
493306
|
+
return new Promise((resolve49) => {
|
|
493307
|
+
let settled = false;
|
|
493308
|
+
const finish = (value) => {
|
|
493309
|
+
if (settled)
|
|
493310
|
+
return;
|
|
493311
|
+
settled = true;
|
|
493312
|
+
resolve49(value);
|
|
493313
|
+
};
|
|
493314
|
+
const onAbort = () => {
|
|
493315
|
+
socket.destroy();
|
|
493316
|
+
finish(false);
|
|
493317
|
+
};
|
|
493318
|
+
signal?.addEventListener("abort", onAbort, { once: true });
|
|
493319
|
+
const timer = setTimeout(() => {
|
|
493320
|
+
socket.destroy();
|
|
493321
|
+
finish(false);
|
|
493322
|
+
}, timeoutMs);
|
|
493323
|
+
const socket = connect({ host, port }, () => {
|
|
493324
|
+
clearTimeout(timer);
|
|
493325
|
+
socket.end();
|
|
493326
|
+
finish(true);
|
|
493327
|
+
});
|
|
493328
|
+
socket.on("error", () => {
|
|
493329
|
+
clearTimeout(timer);
|
|
493330
|
+
finish(false);
|
|
493331
|
+
});
|
|
493332
|
+
socket.on("close", () => {
|
|
493333
|
+
clearTimeout(timer);
|
|
493334
|
+
signal?.removeEventListener("abort", onAbort);
|
|
493335
|
+
});
|
|
493336
|
+
});
|
|
493337
|
+
}
|
|
493338
|
+
async function verifyOllamaHost(host, port, timeoutMs, signal) {
|
|
493339
|
+
if (signal?.aborted)
|
|
493340
|
+
return null;
|
|
493341
|
+
const controller = new AbortController;
|
|
493342
|
+
const timer = setTimeout(() => controller.abort(), timeoutMs);
|
|
493343
|
+
signal?.addEventListener("abort", () => controller.abort(), { once: true });
|
|
493344
|
+
try {
|
|
493345
|
+
const response = await fetch(`http://${host}:${port}/api/tags`, {
|
|
493346
|
+
signal: controller.signal
|
|
493347
|
+
});
|
|
493348
|
+
if (!response.ok)
|
|
493349
|
+
return null;
|
|
493350
|
+
const body = await response.json();
|
|
493351
|
+
const modelNames = parseOllamaModelNames(body);
|
|
493352
|
+
return { host: `http://${host}:${port}`, modelNames };
|
|
493353
|
+
} catch {
|
|
493354
|
+
return null;
|
|
493355
|
+
} finally {
|
|
493356
|
+
clearTimeout(timer);
|
|
493357
|
+
}
|
|
493358
|
+
}
|
|
493359
|
+
async function runWithConcurrency(items, concurrency, fn) {
|
|
493360
|
+
const results = [];
|
|
493361
|
+
let index2 = 0;
|
|
493362
|
+
async function worker() {
|
|
493363
|
+
while (index2 < items.length) {
|
|
493364
|
+
const i3 = index2++;
|
|
493365
|
+
results[i3] = await fn(items[i3]);
|
|
493366
|
+
}
|
|
493367
|
+
}
|
|
493368
|
+
const workers = new Array(Math.min(concurrency, items.length)).fill(null).map(() => worker());
|
|
493369
|
+
await Promise.all(workers);
|
|
493370
|
+
return results;
|
|
493371
|
+
}
|
|
493372
|
+
async function discoverOllamaHosts(options2 = {}) {
|
|
493373
|
+
const {
|
|
493374
|
+
port = 11434,
|
|
493375
|
+
tcpTimeoutMs = 500,
|
|
493376
|
+
httpTimeoutMs = 1000,
|
|
493377
|
+
concurrency = 50,
|
|
493378
|
+
signal,
|
|
493379
|
+
connect = defaultConnect,
|
|
493380
|
+
subnets
|
|
493381
|
+
} = options2;
|
|
493382
|
+
if (signal?.aborted)
|
|
493383
|
+
return [];
|
|
493384
|
+
const hosts = new Set;
|
|
493385
|
+
if (subnets) {
|
|
493386
|
+
for (const [address, prefixLength] of subnets) {
|
|
493387
|
+
for (const host of listSubnetHosts(address, prefixLength)) {
|
|
493388
|
+
hosts.add(host);
|
|
493389
|
+
}
|
|
493390
|
+
}
|
|
493391
|
+
} else {
|
|
493392
|
+
const interfaces = getLocalSubnetInterfaces();
|
|
493393
|
+
if (interfaces.length === 0)
|
|
493394
|
+
return [];
|
|
493395
|
+
for (const iface of interfaces) {
|
|
493396
|
+
for (const host of listSubnetHosts(iface.address, iface.prefixLength)) {
|
|
493397
|
+
hosts.add(host);
|
|
493398
|
+
}
|
|
493399
|
+
}
|
|
493400
|
+
}
|
|
493401
|
+
const candidates2 = [...hosts].filter((h2) => !isOllamaHostExcluded(h2));
|
|
493402
|
+
if (candidates2.length === 0)
|
|
493403
|
+
return [];
|
|
493404
|
+
const openPorts = await runWithConcurrency(candidates2, concurrency, async (host) => {
|
|
493405
|
+
const open18 = await probeTcpPort(host, port, tcpTimeoutMs, connect, signal);
|
|
493406
|
+
return open18 ? host : null;
|
|
493407
|
+
});
|
|
493408
|
+
const openHosts = openPorts.filter((h2) => h2 !== null);
|
|
493409
|
+
if (openHosts.length === 0)
|
|
493410
|
+
return [];
|
|
493411
|
+
const verified = await runWithConcurrency(openHosts, concurrency, async (host) => verifyOllamaHost(host, port, httpTimeoutMs, signal));
|
|
493412
|
+
return verified.filter((h2) => h2 !== null).sort((a2, b) => a2.host.localeCompare(b.host));
|
|
493413
|
+
}
|
|
493414
|
+
var init_ollamaDiscovery = __esm(() => {
|
|
493415
|
+
init_ollamaModels();
|
|
493416
|
+
});
|
|
493417
|
+
|
|
493198
493418
|
// src/utils/telemetry/skillLoadedEvent.ts
|
|
493199
493419
|
async function logSkillsLoaded(cwd2, contextWindowTokens) {
|
|
493200
493420
|
const skills2 = await getSkillToolCommands(cwd2);
|
|
@@ -493917,7 +494137,7 @@ function appendToLog(path24, message) {
|
|
|
493917
494137
|
cwd: getFsImplementation().cwd(),
|
|
493918
494138
|
userType: process.env.USER_TYPE,
|
|
493919
494139
|
sessionId: getSessionId(),
|
|
493920
|
-
version: "1.
|
|
494140
|
+
version: "1.16.1"
|
|
493921
494141
|
};
|
|
493922
494142
|
getLogWriter(path24).write(messageWithTimestamp);
|
|
493923
494143
|
}
|
|
@@ -494414,7 +494634,7 @@ To attach: ${source_default.bold(`tmux attach -t ${tmuxSessionName}`)}`));
|
|
|
494414
494634
|
if (process.env.USER_TYPE === "ant" && process.env.UR_CODE_ENTRYPOINT !== "local-agent" && process.env.UR_CODE_ENTRYPOINT !== "ur-desktop") {
|
|
494415
494635
|
const [isDocker, hasInternet] = await Promise.all([
|
|
494416
494636
|
envDynamic.getIsDocker(),
|
|
494417
|
-
|
|
494637
|
+
env2.hasInternetAccess()
|
|
494418
494638
|
]);
|
|
494419
494639
|
const isBubblewrap = envDynamic.getIsBubblewrapSandbox();
|
|
494420
494640
|
const isSandbox = process.env.IS_SANDBOX === "1";
|
|
@@ -494481,6 +494701,109 @@ var init_setup3 = __esm(() => {
|
|
|
494481
494701
|
init_worktree();
|
|
494482
494702
|
});
|
|
494483
494703
|
|
|
494704
|
+
// src/components/OllamaHostPicker.tsx
|
|
494705
|
+
var exports_OllamaHostPicker = {};
|
|
494706
|
+
__export(exports_OllamaHostPicker, {
|
|
494707
|
+
OllamaHostPicker: () => OllamaHostPicker
|
|
494708
|
+
});
|
|
494709
|
+
function OllamaHostPicker({
|
|
494710
|
+
discovered,
|
|
494711
|
+
currentHost,
|
|
494712
|
+
onSelect
|
|
494713
|
+
}) {
|
|
494714
|
+
const options2 = [
|
|
494715
|
+
{
|
|
494716
|
+
value: "http://localhost:11434",
|
|
494717
|
+
label: "This computer",
|
|
494718
|
+
description: "ollama serve on localhost"
|
|
494719
|
+
},
|
|
494720
|
+
...discovered.map((host) => ({
|
|
494721
|
+
value: host.host,
|
|
494722
|
+
label: host.host,
|
|
494723
|
+
description: host.modelNames.length > 0 ? `${host.modelNames.length} model(s) available` : "Ollama server found"
|
|
494724
|
+
}))
|
|
494725
|
+
];
|
|
494726
|
+
const defaultValue = options2.find((o2) => o2.value === currentHost)?.value ?? options2[0].value;
|
|
494727
|
+
const defaultFocusValue = defaultValue;
|
|
494728
|
+
const handleSelect = (value) => {
|
|
494729
|
+
if (value === "http://localhost:11434") {
|
|
494730
|
+
onSelect(null);
|
|
494731
|
+
return;
|
|
494732
|
+
}
|
|
494733
|
+
onSelect(value);
|
|
494734
|
+
};
|
|
494735
|
+
return /* @__PURE__ */ jsx_dev_runtime484.jsxDEV(Pane, {
|
|
494736
|
+
color: "permission",
|
|
494737
|
+
children: /* @__PURE__ */ jsx_dev_runtime484.jsxDEV(ThemedBox_default, {
|
|
494738
|
+
flexDirection: "column",
|
|
494739
|
+
children: [
|
|
494740
|
+
/* @__PURE__ */ jsx_dev_runtime484.jsxDEV(ThemedBox_default, {
|
|
494741
|
+
marginBottom: 1,
|
|
494742
|
+
flexDirection: "column",
|
|
494743
|
+
children: [
|
|
494744
|
+
/* @__PURE__ */ jsx_dev_runtime484.jsxDEV(ThemedText, {
|
|
494745
|
+
color: "remember",
|
|
494746
|
+
bold: true,
|
|
494747
|
+
children: "Choose Ollama server"
|
|
494748
|
+
}, undefined, false, undefined, this),
|
|
494749
|
+
/* @__PURE__ */ jsx_dev_runtime484.jsxDEV(ThemedText, {
|
|
494750
|
+
dimColor: true,
|
|
494751
|
+
children: "Multiple Ollama servers were found on your network. Pick which one to use for this session."
|
|
494752
|
+
}, undefined, false, undefined, this),
|
|
494753
|
+
currentHost && currentHost !== "http://localhost:11434" && /* @__PURE__ */ jsx_dev_runtime484.jsxDEV(ThemedText, {
|
|
494754
|
+
dimColor: true,
|
|
494755
|
+
children: [
|
|
494756
|
+
"Currently using ",
|
|
494757
|
+
currentHost,
|
|
494758
|
+
" (from settings or previous choice)."
|
|
494759
|
+
]
|
|
494760
|
+
}, undefined, true, undefined, this)
|
|
494761
|
+
]
|
|
494762
|
+
}, undefined, true, undefined, this),
|
|
494763
|
+
/* @__PURE__ */ jsx_dev_runtime484.jsxDEV(ThemedBox_default, {
|
|
494764
|
+
flexDirection: "column",
|
|
494765
|
+
marginBottom: 1,
|
|
494766
|
+
children: /* @__PURE__ */ jsx_dev_runtime484.jsxDEV(Select, {
|
|
494767
|
+
defaultValue,
|
|
494768
|
+
defaultFocusValue,
|
|
494769
|
+
options: options2,
|
|
494770
|
+
onChange: handleSelect,
|
|
494771
|
+
visibleOptionCount: Math.min(8, options2.length)
|
|
494772
|
+
}, undefined, false, undefined, this)
|
|
494773
|
+
}, undefined, false, undefined, this),
|
|
494774
|
+
/* @__PURE__ */ jsx_dev_runtime484.jsxDEV(ThemedText, {
|
|
494775
|
+
dimColor: true,
|
|
494776
|
+
italic: true,
|
|
494777
|
+
children: /* @__PURE__ */ jsx_dev_runtime484.jsxDEV(Byline, {
|
|
494778
|
+
children: [
|
|
494779
|
+
/* @__PURE__ */ jsx_dev_runtime484.jsxDEV(KeyboardShortcutHint, {
|
|
494780
|
+
shortcut: "Enter",
|
|
494781
|
+
action: "confirm"
|
|
494782
|
+
}, undefined, false, undefined, this),
|
|
494783
|
+
/* @__PURE__ */ jsx_dev_runtime484.jsxDEV(ConfigurableShortcutHint, {
|
|
494784
|
+
action: "select:cancel",
|
|
494785
|
+
context: "Select",
|
|
494786
|
+
fallback: "Esc",
|
|
494787
|
+
description: "use localhost"
|
|
494788
|
+
}, undefined, false, undefined, this)
|
|
494789
|
+
]
|
|
494790
|
+
}, undefined, true, undefined, this)
|
|
494791
|
+
}, undefined, false, undefined, this)
|
|
494792
|
+
]
|
|
494793
|
+
}, undefined, true, undefined, this)
|
|
494794
|
+
}, undefined, false, undefined, this);
|
|
494795
|
+
}
|
|
494796
|
+
var jsx_dev_runtime484;
|
|
494797
|
+
var init_OllamaHostPicker = __esm(() => {
|
|
494798
|
+
init_ink2();
|
|
494799
|
+
init_CustomSelect();
|
|
494800
|
+
init_Pane();
|
|
494801
|
+
init_Byline();
|
|
494802
|
+
init_KeyboardShortcutHint();
|
|
494803
|
+
init_ConfigurableShortcutHint();
|
|
494804
|
+
jsx_dev_runtime484 = __toESM(require_jsx_dev_runtime(), 1);
|
|
494805
|
+
});
|
|
494806
|
+
|
|
494484
494807
|
// src/bridge/pollConfigDefaults.ts
|
|
494485
494808
|
var POLL_INTERVAL_MS_NOT_AT_CAPACITY = 2000, POLL_INTERVAL_MS_AT_CAPACITY = 600000, MULTISESSION_POLL_INTERVAL_MS_NOT_AT_CAPACITY, MULTISESSION_POLL_INTERVAL_MS_PARTIAL_CAPACITY, MULTISESSION_POLL_INTERVAL_MS_AT_CAPACITY, DEFAULT_POLL_CONFIG;
|
|
494486
494809
|
var init_pollConfigDefaults = __esm(() => {
|
|
@@ -497943,8 +498266,8 @@ async function getEnvLessBridgeConfig() {
|
|
|
497943
498266
|
}
|
|
497944
498267
|
async function checkEnvLessBridgeMinVersion() {
|
|
497945
498268
|
const cfg = await getEnvLessBridgeConfig();
|
|
497946
|
-
if (cfg.min_version && lt("1.
|
|
497947
|
-
return `Your version of UR (${"1.
|
|
498269
|
+
if (cfg.min_version && lt("1.16.1", cfg.min_version)) {
|
|
498270
|
+
return `Your version of UR (${"1.16.1"}) is too old for Remote Control.
|
|
497948
498271
|
Version ${cfg.min_version} or higher is required. Run \`ur update\` to update.`;
|
|
497949
498272
|
}
|
|
497950
498273
|
return null;
|
|
@@ -498418,7 +498741,7 @@ async function initBridgeCore(params) {
|
|
|
498418
498741
|
const rawApi = createBridgeApiClient({
|
|
498419
498742
|
baseUrl,
|
|
498420
498743
|
getAccessToken,
|
|
498421
|
-
runnerVersion: "1.
|
|
498744
|
+
runnerVersion: "1.16.1",
|
|
498422
498745
|
onDebug: logForDebugging,
|
|
498423
498746
|
onAuth401,
|
|
498424
498747
|
getTrustedDeviceToken
|
|
@@ -503237,9 +503560,9 @@ function TeleportProgress(t0) {
|
|
|
503237
503560
|
const t2 = SPINNER_FRAMES3[frame];
|
|
503238
503561
|
let t3;
|
|
503239
503562
|
if ($3[2] !== t2) {
|
|
503240
|
-
t3 = /* @__PURE__ */
|
|
503563
|
+
t3 = /* @__PURE__ */ jsx_dev_runtime485.jsxDEV(ThemedBox_default, {
|
|
503241
503564
|
marginBottom: 1,
|
|
503242
|
-
children: /* @__PURE__ */
|
|
503565
|
+
children: /* @__PURE__ */ jsx_dev_runtime485.jsxDEV(ThemedText, {
|
|
503243
503566
|
bold: true,
|
|
503244
503567
|
color: "ur",
|
|
503245
503568
|
children: [
|
|
@@ -503255,9 +503578,9 @@ function TeleportProgress(t0) {
|
|
|
503255
503578
|
}
|
|
503256
503579
|
let t4;
|
|
503257
503580
|
if ($3[4] !== sessionId) {
|
|
503258
|
-
t4 = sessionId && /* @__PURE__ */
|
|
503581
|
+
t4 = sessionId && /* @__PURE__ */ jsx_dev_runtime485.jsxDEV(ThemedBox_default, {
|
|
503259
503582
|
marginBottom: 1,
|
|
503260
|
-
children: /* @__PURE__ */
|
|
503583
|
+
children: /* @__PURE__ */ jsx_dev_runtime485.jsxDEV(ThemedText, {
|
|
503261
503584
|
dimColor: true,
|
|
503262
503585
|
children: sessionId
|
|
503263
503586
|
}, undefined, false, undefined, this)
|
|
@@ -503287,18 +503610,18 @@ function TeleportProgress(t0) {
|
|
|
503287
503610
|
color3 = undefined;
|
|
503288
503611
|
}
|
|
503289
503612
|
}
|
|
503290
|
-
return /* @__PURE__ */
|
|
503613
|
+
return /* @__PURE__ */ jsx_dev_runtime485.jsxDEV(ThemedBox_default, {
|
|
503291
503614
|
flexDirection: "row",
|
|
503292
503615
|
children: [
|
|
503293
|
-
/* @__PURE__ */
|
|
503616
|
+
/* @__PURE__ */ jsx_dev_runtime485.jsxDEV(ThemedBox_default, {
|
|
503294
503617
|
width: 2,
|
|
503295
|
-
children: /* @__PURE__ */
|
|
503618
|
+
children: /* @__PURE__ */ jsx_dev_runtime485.jsxDEV(ThemedText, {
|
|
503296
503619
|
color: color3,
|
|
503297
503620
|
dimColor: isPending,
|
|
503298
503621
|
children: icon
|
|
503299
503622
|
}, undefined, false, undefined, this)
|
|
503300
503623
|
}, undefined, false, undefined, this),
|
|
503301
|
-
/* @__PURE__ */
|
|
503624
|
+
/* @__PURE__ */ jsx_dev_runtime485.jsxDEV(ThemedText, {
|
|
503302
503625
|
dimColor: isPending,
|
|
503303
503626
|
bold: isCurrent,
|
|
503304
503627
|
children: step.label
|
|
@@ -503314,7 +503637,7 @@ function TeleportProgress(t0) {
|
|
|
503314
503637
|
}
|
|
503315
503638
|
let t6;
|
|
503316
503639
|
if ($3[9] !== t5) {
|
|
503317
|
-
t6 = /* @__PURE__ */
|
|
503640
|
+
t6 = /* @__PURE__ */ jsx_dev_runtime485.jsxDEV(ThemedBox_default, {
|
|
503318
503641
|
flexDirection: "column",
|
|
503319
503642
|
marginLeft: 2,
|
|
503320
503643
|
children: t5
|
|
@@ -503326,7 +503649,7 @@ function TeleportProgress(t0) {
|
|
|
503326
503649
|
}
|
|
503327
503650
|
let t7;
|
|
503328
503651
|
if ($3[11] !== ref || $3[12] !== t3 || $3[13] !== t4 || $3[14] !== t6) {
|
|
503329
|
-
t7 = /* @__PURE__ */
|
|
503652
|
+
t7 = /* @__PURE__ */ jsx_dev_runtime485.jsxDEV(ThemedBox_default, {
|
|
503330
503653
|
ref,
|
|
503331
503654
|
flexDirection: "column",
|
|
503332
503655
|
paddingX: 1,
|
|
@@ -503352,13 +503675,13 @@ async function teleportWithProgress(root2, sessionId) {
|
|
|
503352
503675
|
function TeleportProgressWrapper() {
|
|
503353
503676
|
const [step, _setStep] = import_react329.useState("validating");
|
|
503354
503677
|
setStep = _setStep;
|
|
503355
|
-
return /* @__PURE__ */
|
|
503678
|
+
return /* @__PURE__ */ jsx_dev_runtime485.jsxDEV(TeleportProgress, {
|
|
503356
503679
|
currentStep: step,
|
|
503357
503680
|
sessionId
|
|
503358
503681
|
}, undefined, false, undefined, this);
|
|
503359
503682
|
}
|
|
503360
|
-
root2.render(/* @__PURE__ */
|
|
503361
|
-
children: /* @__PURE__ */
|
|
503683
|
+
root2.render(/* @__PURE__ */ jsx_dev_runtime485.jsxDEV(AppStateProvider, {
|
|
503684
|
+
children: /* @__PURE__ */ jsx_dev_runtime485.jsxDEV(TeleportProgressWrapper, {}, undefined, false, undefined, this)
|
|
503362
503685
|
}, undefined, false, undefined, this));
|
|
503363
503686
|
const result = await teleportResumeCodeSession(sessionId, setStep);
|
|
503364
503687
|
setStep("checking_out");
|
|
@@ -503371,7 +503694,7 @@ async function teleportWithProgress(root2, sessionId) {
|
|
|
503371
503694
|
branchName
|
|
503372
503695
|
};
|
|
503373
503696
|
}
|
|
503374
|
-
var import_compiler_runtime376, import_react329,
|
|
503697
|
+
var import_compiler_runtime376, import_react329, jsx_dev_runtime485, SPINNER_FRAMES3, STEPS;
|
|
503375
503698
|
var init_TeleportProgress = __esm(() => {
|
|
503376
503699
|
init_figures();
|
|
503377
503700
|
init_ink2();
|
|
@@ -503379,7 +503702,7 @@ var init_TeleportProgress = __esm(() => {
|
|
|
503379
503702
|
init_teleport();
|
|
503380
503703
|
import_compiler_runtime376 = __toESM(require_compiler_runtime(), 1);
|
|
503381
503704
|
import_react329 = __toESM(require_react(), 1);
|
|
503382
|
-
|
|
503705
|
+
jsx_dev_runtime485 = __toESM(require_jsx_dev_runtime(), 1);
|
|
503383
503706
|
SPINNER_FRAMES3 = ["\u25D0", "\u25D3", "\u25D1", "\u25D2"];
|
|
503384
503707
|
STEPS = [{
|
|
503385
503708
|
key: "validating",
|
|
@@ -503515,7 +503838,7 @@ No servers were imported.`);
|
|
|
503515
503838
|
const t10 = `Found ${t8} MCP ${t9} in UR Desktop.`;
|
|
503516
503839
|
let t11;
|
|
503517
503840
|
if ($3[16] !== collisions.length) {
|
|
503518
|
-
t11 = collisions.length > 0 && /* @__PURE__ */
|
|
503841
|
+
t11 = collisions.length > 0 && /* @__PURE__ */ jsx_dev_runtime486.jsxDEV(ThemedText, {
|
|
503519
503842
|
color: "warning",
|
|
503520
503843
|
children: "Note: Some servers already exist with the same name. If selected, they will be imported with a numbered suffix."
|
|
503521
503844
|
}, undefined, false, undefined, this);
|
|
@@ -503526,7 +503849,7 @@ No servers were imported.`);
|
|
|
503526
503849
|
}
|
|
503527
503850
|
let t12;
|
|
503528
503851
|
if ($3[18] === Symbol.for("react.memo_cache_sentinel")) {
|
|
503529
|
-
t12 = /* @__PURE__ */
|
|
503852
|
+
t12 = /* @__PURE__ */ jsx_dev_runtime486.jsxDEV(ThemedText, {
|
|
503530
503853
|
children: "Please select the servers you want to import:"
|
|
503531
503854
|
}, undefined, false, undefined, this);
|
|
503532
503855
|
$3[18] = t12;
|
|
@@ -503551,7 +503874,7 @@ No servers were imported.`);
|
|
|
503551
503874
|
}
|
|
503552
503875
|
let t15;
|
|
503553
503876
|
if ($3[23] !== handleEscCancel || $3[24] !== onSubmit || $3[25] !== t13 || $3[26] !== t14) {
|
|
503554
|
-
t15 = /* @__PURE__ */
|
|
503877
|
+
t15 = /* @__PURE__ */ jsx_dev_runtime486.jsxDEV(SelectMulti, {
|
|
503555
503878
|
options: t13,
|
|
503556
503879
|
defaultValue: t14,
|
|
503557
503880
|
onSubmit,
|
|
@@ -503568,7 +503891,7 @@ No servers were imported.`);
|
|
|
503568
503891
|
}
|
|
503569
503892
|
let t16;
|
|
503570
503893
|
if ($3[28] !== handleEscCancel || $3[29] !== t10 || $3[30] !== t11 || $3[31] !== t15) {
|
|
503571
|
-
t16 = /* @__PURE__ */
|
|
503894
|
+
t16 = /* @__PURE__ */ jsx_dev_runtime486.jsxDEV(Dialog, {
|
|
503572
503895
|
title: "Import MCP Servers from UR Desktop",
|
|
503573
503896
|
subtitle: t10,
|
|
503574
503897
|
color: "success",
|
|
@@ -503590,22 +503913,22 @@ No servers were imported.`);
|
|
|
503590
503913
|
}
|
|
503591
503914
|
let t17;
|
|
503592
503915
|
if ($3[33] === Symbol.for("react.memo_cache_sentinel")) {
|
|
503593
|
-
t17 = /* @__PURE__ */
|
|
503916
|
+
t17 = /* @__PURE__ */ jsx_dev_runtime486.jsxDEV(ThemedBox_default, {
|
|
503594
503917
|
paddingX: 1,
|
|
503595
|
-
children: /* @__PURE__ */
|
|
503918
|
+
children: /* @__PURE__ */ jsx_dev_runtime486.jsxDEV(ThemedText, {
|
|
503596
503919
|
dimColor: true,
|
|
503597
503920
|
italic: true,
|
|
503598
|
-
children: /* @__PURE__ */
|
|
503921
|
+
children: /* @__PURE__ */ jsx_dev_runtime486.jsxDEV(Byline, {
|
|
503599
503922
|
children: [
|
|
503600
|
-
/* @__PURE__ */
|
|
503923
|
+
/* @__PURE__ */ jsx_dev_runtime486.jsxDEV(KeyboardShortcutHint, {
|
|
503601
503924
|
shortcut: "Space",
|
|
503602
503925
|
action: "select"
|
|
503603
503926
|
}, undefined, false, undefined, this),
|
|
503604
|
-
/* @__PURE__ */
|
|
503927
|
+
/* @__PURE__ */ jsx_dev_runtime486.jsxDEV(KeyboardShortcutHint, {
|
|
503605
503928
|
shortcut: "Enter",
|
|
503606
503929
|
action: "confirm"
|
|
503607
503930
|
}, undefined, false, undefined, this),
|
|
503608
|
-
/* @__PURE__ */
|
|
503931
|
+
/* @__PURE__ */ jsx_dev_runtime486.jsxDEV(ConfigurableShortcutHint, {
|
|
503609
503932
|
action: "confirm:no",
|
|
503610
503933
|
context: "Confirmation",
|
|
503611
503934
|
fallback: "Esc",
|
|
@@ -503621,7 +503944,7 @@ No servers were imported.`);
|
|
|
503621
503944
|
}
|
|
503622
503945
|
let t18;
|
|
503623
503946
|
if ($3[34] !== t16) {
|
|
503624
|
-
t18 = /* @__PURE__ */
|
|
503947
|
+
t18 = /* @__PURE__ */ jsx_dev_runtime486.jsxDEV(jsx_dev_runtime486.Fragment, {
|
|
503625
503948
|
children: [
|
|
503626
503949
|
t16,
|
|
503627
503950
|
t17
|
|
@@ -503634,7 +503957,7 @@ No servers were imported.`);
|
|
|
503634
503957
|
}
|
|
503635
503958
|
return t18;
|
|
503636
503959
|
}
|
|
503637
|
-
var import_compiler_runtime377, import_react330,
|
|
503960
|
+
var import_compiler_runtime377, import_react330, jsx_dev_runtime486;
|
|
503638
503961
|
var init_MCPServerDesktopImportDialog = __esm(() => {
|
|
503639
503962
|
init_gracefulShutdown();
|
|
503640
503963
|
init_ink2();
|
|
@@ -503647,7 +503970,7 @@ var init_MCPServerDesktopImportDialog = __esm(() => {
|
|
|
503647
503970
|
init_KeyboardShortcutHint();
|
|
503648
503971
|
import_compiler_runtime377 = __toESM(require_compiler_runtime(), 1);
|
|
503649
503972
|
import_react330 = __toESM(require_react(), 1);
|
|
503650
|
-
|
|
503973
|
+
jsx_dev_runtime486 = __toESM(require_jsx_dev_runtime(), 1);
|
|
503651
503974
|
});
|
|
503652
503975
|
|
|
503653
503976
|
// node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/server.js
|
|
@@ -504083,7 +504406,7 @@ async function startMCPServer(cwd3, debug2, verbose) {
|
|
|
504083
504406
|
setCwd(cwd3);
|
|
504084
504407
|
const server = new Server({
|
|
504085
504408
|
name: "ur/tengu",
|
|
504086
|
-
version: "1.
|
|
504409
|
+
version: "1.16.1"
|
|
504087
504410
|
}, {
|
|
504088
504411
|
capabilities: {
|
|
504089
504412
|
tools: {}
|
|
@@ -504571,9 +504894,9 @@ async function mcpAddFromDesktopHandler(options2) {
|
|
|
504571
504894
|
}
|
|
504572
504895
|
const {
|
|
504573
504896
|
unmount
|
|
504574
|
-
} = await render(/* @__PURE__ */
|
|
504575
|
-
children: /* @__PURE__ */
|
|
504576
|
-
children: /* @__PURE__ */
|
|
504897
|
+
} = await render(/* @__PURE__ */ jsx_dev_runtime487.jsxDEV(AppStateProvider, {
|
|
504898
|
+
children: /* @__PURE__ */ jsx_dev_runtime487.jsxDEV(KeybindingSetup, {
|
|
504899
|
+
children: /* @__PURE__ */ jsx_dev_runtime487.jsxDEV(MCPServerDesktopImportDialog, {
|
|
504577
504900
|
servers,
|
|
504578
504901
|
scope,
|
|
504579
504902
|
onDone: () => {
|
|
@@ -504599,7 +504922,7 @@ async function mcpResetChoicesHandler() {
|
|
|
504599
504922
|
cliOk(`All project-scoped (.mcp.json) server approvals and rejections have been reset.
|
|
504600
504923
|
You will be prompted for approval next time you start UR.`);
|
|
504601
504924
|
}
|
|
504602
|
-
var
|
|
504925
|
+
var jsx_dev_runtime487;
|
|
504603
504926
|
var init_mcp5 = __esm(() => {
|
|
504604
504927
|
init_p_map();
|
|
504605
504928
|
init_MCPServerDesktopImportDialog();
|
|
@@ -504616,7 +504939,7 @@ var init_mcp5 = __esm(() => {
|
|
|
504616
504939
|
init_gracefulShutdown();
|
|
504617
504940
|
init_json();
|
|
504618
504941
|
init_platform2();
|
|
504619
|
-
|
|
504942
|
+
jsx_dev_runtime487 = __toESM(require_jsx_dev_runtime(), 1);
|
|
504620
504943
|
});
|
|
504621
504944
|
|
|
504622
504945
|
// src/cli/handlers/plugins.ts
|
|
@@ -505152,7 +505475,7 @@ __export(exports_install, {
|
|
|
505152
505475
|
import { homedir as homedir40 } from "os";
|
|
505153
505476
|
import { join as join196 } from "path";
|
|
505154
505477
|
function getInstallationPath2() {
|
|
505155
|
-
const isWindows2 =
|
|
505478
|
+
const isWindows2 = env2.platform === "win32";
|
|
505156
505479
|
const homeDir = homedir40();
|
|
505157
505480
|
if (isWindows2) {
|
|
505158
505481
|
const windowsPath = join196(homeDir, ".local", "bin", "ur.exe");
|
|
@@ -505170,11 +505493,11 @@ function SetupNotes(t0) {
|
|
|
505170
505493
|
}
|
|
505171
505494
|
let t1;
|
|
505172
505495
|
if ($3[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
505173
|
-
t1 = /* @__PURE__ */
|
|
505174
|
-
children: /* @__PURE__ */
|
|
505496
|
+
t1 = /* @__PURE__ */ jsx_dev_runtime488.jsxDEV(ThemedBox_default, {
|
|
505497
|
+
children: /* @__PURE__ */ jsx_dev_runtime488.jsxDEV(ThemedText, {
|
|
505175
505498
|
color: "warning",
|
|
505176
505499
|
children: [
|
|
505177
|
-
/* @__PURE__ */
|
|
505500
|
+
/* @__PURE__ */ jsx_dev_runtime488.jsxDEV(StatusIcon, {
|
|
505178
505501
|
status: "warning",
|
|
505179
505502
|
withSpace: true
|
|
505180
505503
|
}, undefined, false, undefined, this),
|
|
@@ -505196,7 +505519,7 @@ function SetupNotes(t0) {
|
|
|
505196
505519
|
}
|
|
505197
505520
|
let t3;
|
|
505198
505521
|
if ($3[3] !== t2) {
|
|
505199
|
-
t3 = /* @__PURE__ */
|
|
505522
|
+
t3 = /* @__PURE__ */ jsx_dev_runtime488.jsxDEV(ThemedBox_default, {
|
|
505200
505523
|
flexDirection: "column",
|
|
505201
505524
|
gap: 0,
|
|
505202
505525
|
marginBottom: 1,
|
|
@@ -505213,9 +505536,9 @@ function SetupNotes(t0) {
|
|
|
505213
505536
|
return t3;
|
|
505214
505537
|
}
|
|
505215
505538
|
function _temp303(message, index2) {
|
|
505216
|
-
return /* @__PURE__ */
|
|
505539
|
+
return /* @__PURE__ */ jsx_dev_runtime488.jsxDEV(ThemedBox_default, {
|
|
505217
505540
|
marginLeft: 2,
|
|
505218
|
-
children: /* @__PURE__ */
|
|
505541
|
+
children: /* @__PURE__ */ jsx_dev_runtime488.jsxDEV(ThemedText, {
|
|
505219
505542
|
dimColor: true,
|
|
505220
505543
|
children: [
|
|
505221
505544
|
"\u2022 ",
|
|
@@ -505331,19 +505654,19 @@ function Install({
|
|
|
505331
505654
|
});
|
|
505332
505655
|
}
|
|
505333
505656
|
}, [state2, onDone]);
|
|
505334
|
-
return /* @__PURE__ */
|
|
505657
|
+
return /* @__PURE__ */ jsx_dev_runtime488.jsxDEV(ThemedBox_default, {
|
|
505335
505658
|
flexDirection: "column",
|
|
505336
505659
|
marginTop: 1,
|
|
505337
505660
|
children: [
|
|
505338
|
-
state2.type === "checking" && /* @__PURE__ */
|
|
505661
|
+
state2.type === "checking" && /* @__PURE__ */ jsx_dev_runtime488.jsxDEV(ThemedText, {
|
|
505339
505662
|
color: "ur",
|
|
505340
505663
|
children: "Checking installation status..."
|
|
505341
505664
|
}, undefined, false, undefined, this),
|
|
505342
|
-
state2.type === "cleaning-npm" && /* @__PURE__ */
|
|
505665
|
+
state2.type === "cleaning-npm" && /* @__PURE__ */ jsx_dev_runtime488.jsxDEV(ThemedText, {
|
|
505343
505666
|
color: "warning",
|
|
505344
505667
|
children: "Cleaning up old npm installations..."
|
|
505345
505668
|
}, undefined, false, undefined, this),
|
|
505346
|
-
state2.type === "installing" && /* @__PURE__ */
|
|
505669
|
+
state2.type === "installing" && /* @__PURE__ */ jsx_dev_runtime488.jsxDEV(ThemedText, {
|
|
505347
505670
|
color: "ur",
|
|
505348
505671
|
children: [
|
|
505349
505672
|
"Installing UR native build ",
|
|
@@ -505351,54 +505674,54 @@ function Install({
|
|
|
505351
505674
|
"..."
|
|
505352
505675
|
]
|
|
505353
505676
|
}, undefined, true, undefined, this),
|
|
505354
|
-
state2.type === "setting-up" && /* @__PURE__ */
|
|
505677
|
+
state2.type === "setting-up" && /* @__PURE__ */ jsx_dev_runtime488.jsxDEV(ThemedText, {
|
|
505355
505678
|
color: "ur",
|
|
505356
505679
|
children: "Setting up launcher and shell integration..."
|
|
505357
505680
|
}, undefined, false, undefined, this),
|
|
505358
|
-
state2.type === "set-up" && /* @__PURE__ */
|
|
505681
|
+
state2.type === "set-up" && /* @__PURE__ */ jsx_dev_runtime488.jsxDEV(SetupNotes, {
|
|
505359
505682
|
messages: state2.messages
|
|
505360
505683
|
}, undefined, false, undefined, this),
|
|
505361
|
-
state2.type === "success" && /* @__PURE__ */
|
|
505684
|
+
state2.type === "success" && /* @__PURE__ */ jsx_dev_runtime488.jsxDEV(ThemedBox_default, {
|
|
505362
505685
|
flexDirection: "column",
|
|
505363
505686
|
gap: 1,
|
|
505364
505687
|
children: [
|
|
505365
|
-
/* @__PURE__ */
|
|
505688
|
+
/* @__PURE__ */ jsx_dev_runtime488.jsxDEV(ThemedBox_default, {
|
|
505366
505689
|
children: [
|
|
505367
|
-
/* @__PURE__ */
|
|
505690
|
+
/* @__PURE__ */ jsx_dev_runtime488.jsxDEV(StatusIcon, {
|
|
505368
505691
|
status: "success",
|
|
505369
505692
|
withSpace: true
|
|
505370
505693
|
}, undefined, false, undefined, this),
|
|
505371
|
-
/* @__PURE__ */
|
|
505694
|
+
/* @__PURE__ */ jsx_dev_runtime488.jsxDEV(ThemedText, {
|
|
505372
505695
|
color: "success",
|
|
505373
505696
|
bold: true,
|
|
505374
505697
|
children: "UR successfully installed!"
|
|
505375
505698
|
}, undefined, false, undefined, this)
|
|
505376
505699
|
]
|
|
505377
505700
|
}, undefined, true, undefined, this),
|
|
505378
|
-
/* @__PURE__ */
|
|
505701
|
+
/* @__PURE__ */ jsx_dev_runtime488.jsxDEV(ThemedBox_default, {
|
|
505379
505702
|
marginLeft: 2,
|
|
505380
505703
|
flexDirection: "column",
|
|
505381
505704
|
gap: 1,
|
|
505382
505705
|
children: [
|
|
505383
|
-
state2.version !== "current" && /* @__PURE__ */
|
|
505706
|
+
state2.version !== "current" && /* @__PURE__ */ jsx_dev_runtime488.jsxDEV(ThemedBox_default, {
|
|
505384
505707
|
children: [
|
|
505385
|
-
/* @__PURE__ */
|
|
505708
|
+
/* @__PURE__ */ jsx_dev_runtime488.jsxDEV(ThemedText, {
|
|
505386
505709
|
dimColor: true,
|
|
505387
505710
|
children: "Version: "
|
|
505388
505711
|
}, undefined, false, undefined, this),
|
|
505389
|
-
/* @__PURE__ */
|
|
505712
|
+
/* @__PURE__ */ jsx_dev_runtime488.jsxDEV(ThemedText, {
|
|
505390
505713
|
color: "ur",
|
|
505391
505714
|
children: state2.version
|
|
505392
505715
|
}, undefined, false, undefined, this)
|
|
505393
505716
|
]
|
|
505394
505717
|
}, undefined, true, undefined, this),
|
|
505395
|
-
/* @__PURE__ */
|
|
505718
|
+
/* @__PURE__ */ jsx_dev_runtime488.jsxDEV(ThemedBox_default, {
|
|
505396
505719
|
children: [
|
|
505397
|
-
/* @__PURE__ */
|
|
505720
|
+
/* @__PURE__ */ jsx_dev_runtime488.jsxDEV(ThemedText, {
|
|
505398
505721
|
dimColor: true,
|
|
505399
505722
|
children: "Location: "
|
|
505400
505723
|
}, undefined, false, undefined, this),
|
|
505401
|
-
/* @__PURE__ */
|
|
505724
|
+
/* @__PURE__ */ jsx_dev_runtime488.jsxDEV(ThemedText, {
|
|
505402
505725
|
color: "text",
|
|
505403
505726
|
children: getInstallationPath2()
|
|
505404
505727
|
}, undefined, false, undefined, this)
|
|
@@ -505406,57 +505729,57 @@ function Install({
|
|
|
505406
505729
|
}, undefined, true, undefined, this)
|
|
505407
505730
|
]
|
|
505408
505731
|
}, undefined, true, undefined, this),
|
|
505409
|
-
/* @__PURE__ */
|
|
505732
|
+
/* @__PURE__ */ jsx_dev_runtime488.jsxDEV(ThemedBox_default, {
|
|
505410
505733
|
marginLeft: 2,
|
|
505411
505734
|
flexDirection: "column",
|
|
505412
505735
|
gap: 1,
|
|
505413
|
-
children: /* @__PURE__ */
|
|
505736
|
+
children: /* @__PURE__ */ jsx_dev_runtime488.jsxDEV(ThemedBox_default, {
|
|
505414
505737
|
marginTop: 1,
|
|
505415
505738
|
children: [
|
|
505416
|
-
/* @__PURE__ */
|
|
505739
|
+
/* @__PURE__ */ jsx_dev_runtime488.jsxDEV(ThemedText, {
|
|
505417
505740
|
dimColor: true,
|
|
505418
505741
|
children: "Next: Run "
|
|
505419
505742
|
}, undefined, false, undefined, this),
|
|
505420
|
-
/* @__PURE__ */
|
|
505743
|
+
/* @__PURE__ */ jsx_dev_runtime488.jsxDEV(ThemedText, {
|
|
505421
505744
|
color: "ur",
|
|
505422
505745
|
bold: true,
|
|
505423
505746
|
children: "ur --help"
|
|
505424
505747
|
}, undefined, false, undefined, this),
|
|
505425
|
-
/* @__PURE__ */
|
|
505748
|
+
/* @__PURE__ */ jsx_dev_runtime488.jsxDEV(ThemedText, {
|
|
505426
505749
|
dimColor: true,
|
|
505427
505750
|
children: " to get started"
|
|
505428
505751
|
}, undefined, false, undefined, this)
|
|
505429
505752
|
]
|
|
505430
505753
|
}, undefined, true, undefined, this)
|
|
505431
505754
|
}, undefined, false, undefined, this),
|
|
505432
|
-
state2.setupMessages && /* @__PURE__ */
|
|
505755
|
+
state2.setupMessages && /* @__PURE__ */ jsx_dev_runtime488.jsxDEV(SetupNotes, {
|
|
505433
505756
|
messages: state2.setupMessages
|
|
505434
505757
|
}, undefined, false, undefined, this)
|
|
505435
505758
|
]
|
|
505436
505759
|
}, undefined, true, undefined, this),
|
|
505437
|
-
state2.type === "error" && /* @__PURE__ */
|
|
505760
|
+
state2.type === "error" && /* @__PURE__ */ jsx_dev_runtime488.jsxDEV(ThemedBox_default, {
|
|
505438
505761
|
flexDirection: "column",
|
|
505439
505762
|
gap: 1,
|
|
505440
505763
|
children: [
|
|
505441
|
-
/* @__PURE__ */
|
|
505764
|
+
/* @__PURE__ */ jsx_dev_runtime488.jsxDEV(ThemedBox_default, {
|
|
505442
505765
|
children: [
|
|
505443
|
-
/* @__PURE__ */
|
|
505766
|
+
/* @__PURE__ */ jsx_dev_runtime488.jsxDEV(StatusIcon, {
|
|
505444
505767
|
status: "error",
|
|
505445
505768
|
withSpace: true
|
|
505446
505769
|
}, undefined, false, undefined, this),
|
|
505447
|
-
/* @__PURE__ */
|
|
505770
|
+
/* @__PURE__ */ jsx_dev_runtime488.jsxDEV(ThemedText, {
|
|
505448
505771
|
color: "error",
|
|
505449
505772
|
children: "Installation failed"
|
|
505450
505773
|
}, undefined, false, undefined, this)
|
|
505451
505774
|
]
|
|
505452
505775
|
}, undefined, true, undefined, this),
|
|
505453
|
-
/* @__PURE__ */
|
|
505776
|
+
/* @__PURE__ */ jsx_dev_runtime488.jsxDEV(ThemedText, {
|
|
505454
505777
|
color: "error",
|
|
505455
505778
|
children: state2.message
|
|
505456
505779
|
}, undefined, false, undefined, this),
|
|
505457
|
-
/* @__PURE__ */
|
|
505780
|
+
/* @__PURE__ */ jsx_dev_runtime488.jsxDEV(ThemedBox_default, {
|
|
505458
505781
|
marginTop: 1,
|
|
505459
|
-
children: /* @__PURE__ */
|
|
505782
|
+
children: /* @__PURE__ */ jsx_dev_runtime488.jsxDEV(ThemedText, {
|
|
505460
505783
|
dimColor: true,
|
|
505461
505784
|
children: "Try running with --force to override checks"
|
|
505462
505785
|
}, undefined, false, undefined, this)
|
|
@@ -505466,7 +505789,7 @@ function Install({
|
|
|
505466
505789
|
]
|
|
505467
505790
|
}, undefined, true, undefined, this);
|
|
505468
505791
|
}
|
|
505469
|
-
var import_compiler_runtime378, import_react331,
|
|
505792
|
+
var import_compiler_runtime378, import_react331, jsx_dev_runtime488, install;
|
|
505470
505793
|
var init_install = __esm(() => {
|
|
505471
505794
|
init_analytics();
|
|
505472
505795
|
init_StatusIcon();
|
|
@@ -505478,7 +505801,7 @@ var init_install = __esm(() => {
|
|
|
505478
505801
|
init_settings2();
|
|
505479
505802
|
import_compiler_runtime378 = __toESM(require_compiler_runtime(), 1);
|
|
505480
505803
|
import_react331 = __toESM(require_react(), 1);
|
|
505481
|
-
|
|
505804
|
+
jsx_dev_runtime488 = __toESM(require_jsx_dev_runtime(), 1);
|
|
505482
505805
|
install = {
|
|
505483
505806
|
type: "local-jsx",
|
|
505484
505807
|
name: "install",
|
|
@@ -505490,7 +505813,7 @@ var init_install = __esm(() => {
|
|
|
505490
505813
|
const target = nonFlagArgs[0];
|
|
505491
505814
|
const {
|
|
505492
505815
|
unmount
|
|
505493
|
-
} = await render(/* @__PURE__ */
|
|
505816
|
+
} = await render(/* @__PURE__ */ jsx_dev_runtime488.jsxDEV(Install, {
|
|
505494
505817
|
onDone: (result, options2) => {
|
|
505495
505818
|
unmount();
|
|
505496
505819
|
onDone(result, options2);
|
|
@@ -505517,28 +505840,28 @@ async function setupTokenHandler(root2) {
|
|
|
505517
505840
|
ConsoleOAuthFlow: ConsoleOAuthFlow2
|
|
505518
505841
|
} = await Promise.resolve().then(() => (init_ConsoleOAuthFlow(), exports_ConsoleOAuthFlow));
|
|
505519
505842
|
await new Promise((resolve49) => {
|
|
505520
|
-
root2.render(/* @__PURE__ */
|
|
505843
|
+
root2.render(/* @__PURE__ */ jsx_dev_runtime489.jsxDEV(AppStateProvider, {
|
|
505521
505844
|
onChangeAppState,
|
|
505522
|
-
children: /* @__PURE__ */
|
|
505523
|
-
children: /* @__PURE__ */
|
|
505845
|
+
children: /* @__PURE__ */ jsx_dev_runtime489.jsxDEV(KeybindingSetup, {
|
|
505846
|
+
children: /* @__PURE__ */ jsx_dev_runtime489.jsxDEV(ThemedBox_default, {
|
|
505524
505847
|
flexDirection: "column",
|
|
505525
505848
|
gap: 1,
|
|
505526
505849
|
children: [
|
|
505527
|
-
/* @__PURE__ */
|
|
505528
|
-
showAuthWarning && /* @__PURE__ */
|
|
505850
|
+
/* @__PURE__ */ jsx_dev_runtime489.jsxDEV(WelcomeV2, {}, undefined, false, undefined, this),
|
|
505851
|
+
showAuthWarning && /* @__PURE__ */ jsx_dev_runtime489.jsxDEV(ThemedBox_default, {
|
|
505529
505852
|
flexDirection: "column",
|
|
505530
505853
|
children: [
|
|
505531
|
-
/* @__PURE__ */
|
|
505854
|
+
/* @__PURE__ */ jsx_dev_runtime489.jsxDEV(ThemedText, {
|
|
505532
505855
|
color: "warning",
|
|
505533
505856
|
children: "Warning: You already have authentication configured via environment variable or API key helper."
|
|
505534
505857
|
}, undefined, false, undefined, this),
|
|
505535
|
-
/* @__PURE__ */
|
|
505858
|
+
/* @__PURE__ */ jsx_dev_runtime489.jsxDEV(ThemedText, {
|
|
505536
505859
|
color: "warning",
|
|
505537
505860
|
children: "The setup-token command will create a new OAuth token which you can use instead."
|
|
505538
505861
|
}, undefined, false, undefined, this)
|
|
505539
505862
|
]
|
|
505540
505863
|
}, undefined, true, undefined, this),
|
|
505541
|
-
/* @__PURE__ */
|
|
505864
|
+
/* @__PURE__ */ jsx_dev_runtime489.jsxDEV(ConsoleOAuthFlow2, {
|
|
505542
505865
|
onDone: () => {
|
|
505543
505866
|
resolve49();
|
|
505544
505867
|
},
|
|
@@ -505561,9 +505884,9 @@ function DoctorWithPlugins(t0) {
|
|
|
505561
505884
|
useManagePlugins();
|
|
505562
505885
|
let t1;
|
|
505563
505886
|
if ($3[0] !== onDone) {
|
|
505564
|
-
t1 = /* @__PURE__ */
|
|
505887
|
+
t1 = /* @__PURE__ */ jsx_dev_runtime489.jsxDEV(import_react332.default.Suspense, {
|
|
505565
505888
|
fallback: null,
|
|
505566
|
-
children: /* @__PURE__ */
|
|
505889
|
+
children: /* @__PURE__ */ jsx_dev_runtime489.jsxDEV(DoctorLazy, {
|
|
505567
505890
|
onDone
|
|
505568
505891
|
}, undefined, false, undefined, this)
|
|
505569
505892
|
}, undefined, false, undefined, this);
|
|
@@ -505577,12 +505900,12 @@ function DoctorWithPlugins(t0) {
|
|
|
505577
505900
|
async function doctorHandler(root2) {
|
|
505578
505901
|
logEvent("tengu_doctor_command", {});
|
|
505579
505902
|
await new Promise((resolve49) => {
|
|
505580
|
-
root2.render(/* @__PURE__ */
|
|
505581
|
-
children: /* @__PURE__ */
|
|
505582
|
-
children: /* @__PURE__ */
|
|
505903
|
+
root2.render(/* @__PURE__ */ jsx_dev_runtime489.jsxDEV(AppStateProvider, {
|
|
505904
|
+
children: /* @__PURE__ */ jsx_dev_runtime489.jsxDEV(KeybindingSetup, {
|
|
505905
|
+
children: /* @__PURE__ */ jsx_dev_runtime489.jsxDEV(MCPConnectionManager, {
|
|
505583
505906
|
dynamicMcpConfig: undefined,
|
|
505584
505907
|
isStrictMcpConfig: false,
|
|
505585
|
-
children: /* @__PURE__ */
|
|
505908
|
+
children: /* @__PURE__ */ jsx_dev_runtime489.jsxDEV(DoctorWithPlugins, {
|
|
505586
505909
|
onDone: () => {
|
|
505587
505910
|
resolve49();
|
|
505588
505911
|
}
|
|
@@ -505614,7 +505937,7 @@ async function installHandler(target, options2) {
|
|
|
505614
505937
|
}, {}, args);
|
|
505615
505938
|
});
|
|
505616
505939
|
}
|
|
505617
|
-
var import_compiler_runtime379, import_react332,
|
|
505940
|
+
var import_compiler_runtime379, import_react332, jsx_dev_runtime489, DoctorLazy;
|
|
505618
505941
|
var init_util4 = __esm(() => {
|
|
505619
505942
|
init_WelcomeV2();
|
|
505620
505943
|
init_useManagePlugins();
|
|
@@ -505627,7 +505950,7 @@ var init_util4 = __esm(() => {
|
|
|
505627
505950
|
init_auth();
|
|
505628
505951
|
import_compiler_runtime379 = __toESM(require_compiler_runtime(), 1);
|
|
505629
505952
|
import_react332 = __toESM(require_react(), 1);
|
|
505630
|
-
|
|
505953
|
+
jsx_dev_runtime489 = __toESM(require_jsx_dev_runtime(), 1);
|
|
505631
505954
|
DoctorLazy = import_react332.default.lazy(() => Promise.resolve().then(() => (init_Doctor(), exports_Doctor)).then((m) => ({
|
|
505632
505955
|
default: m.Doctor
|
|
505633
505956
|
})));
|
|
@@ -505694,7 +506017,7 @@ __export(exports_update, {
|
|
|
505694
506017
|
});
|
|
505695
506018
|
async function update() {
|
|
505696
506019
|
logEvent("tengu_update_check", {});
|
|
505697
|
-
writeToStdout(`Current version: ${"1.
|
|
506020
|
+
writeToStdout(`Current version: ${"1.16.1"}
|
|
505698
506021
|
`);
|
|
505699
506022
|
const channel = getInitialSettings()?.autoUpdatesChannel ?? "latest";
|
|
505700
506023
|
writeToStdout(`Checking for updates to ${channel} version...
|
|
@@ -505769,8 +506092,8 @@ async function update() {
|
|
|
505769
506092
|
writeToStdout(`UR is managed by Homebrew.
|
|
505770
506093
|
`);
|
|
505771
506094
|
const latest = await getLatestVersion(channel);
|
|
505772
|
-
if (latest && !gte("1.
|
|
505773
|
-
writeToStdout(`${formatUpdateAvailableMessage("1.
|
|
506095
|
+
if (latest && !gte("1.16.1", latest)) {
|
|
506096
|
+
writeToStdout(`${formatUpdateAvailableMessage("1.16.1", latest)}
|
|
505774
506097
|
`);
|
|
505775
506098
|
writeToStdout(`
|
|
505776
506099
|
`);
|
|
@@ -505786,8 +506109,8 @@ async function update() {
|
|
|
505786
506109
|
writeToStdout(`UR is managed by winget.
|
|
505787
506110
|
`);
|
|
505788
506111
|
const latest = await getLatestVersion(channel);
|
|
505789
|
-
if (latest && !gte("1.
|
|
505790
|
-
writeToStdout(`${formatUpdateAvailableMessage("1.
|
|
506112
|
+
if (latest && !gte("1.16.1", latest)) {
|
|
506113
|
+
writeToStdout(`${formatUpdateAvailableMessage("1.16.1", latest)}
|
|
505791
506114
|
`);
|
|
505792
506115
|
writeToStdout(`
|
|
505793
506116
|
`);
|
|
@@ -505803,8 +506126,8 @@ async function update() {
|
|
|
505803
506126
|
writeToStdout(`UR is managed by apk.
|
|
505804
506127
|
`);
|
|
505805
506128
|
const latest = await getLatestVersion(channel);
|
|
505806
|
-
if (latest && !gte("1.
|
|
505807
|
-
writeToStdout(`${formatUpdateAvailableMessage("1.
|
|
506129
|
+
if (latest && !gte("1.16.1", latest)) {
|
|
506130
|
+
writeToStdout(`${formatUpdateAvailableMessage("1.16.1", latest)}
|
|
505808
506131
|
`);
|
|
505809
506132
|
writeToStdout(`
|
|
505810
506133
|
`);
|
|
@@ -505869,11 +506192,11 @@ async function update() {
|
|
|
505869
506192
|
`);
|
|
505870
506193
|
await gracefulShutdown(1);
|
|
505871
506194
|
}
|
|
505872
|
-
if (result.latestVersion === "1.
|
|
505873
|
-
writeToStdout(source_default.green(`UR is up to date (${"1.
|
|
506195
|
+
if (result.latestVersion === "1.16.1") {
|
|
506196
|
+
writeToStdout(source_default.green(`UR is up to date (${"1.16.1"})`) + `
|
|
505874
506197
|
`);
|
|
505875
506198
|
} else {
|
|
505876
|
-
writeToStdout(source_default.green(`Successfully updated from ${"1.
|
|
506199
|
+
writeToStdout(source_default.green(`Successfully updated from ${"1.16.1"} to version ${result.latestVersion}`) + `
|
|
505877
506200
|
`);
|
|
505878
506201
|
await regenerateCompletionCache();
|
|
505879
506202
|
}
|
|
@@ -505933,12 +506256,12 @@ async function update() {
|
|
|
505933
506256
|
`);
|
|
505934
506257
|
await gracefulShutdown(1);
|
|
505935
506258
|
}
|
|
505936
|
-
if (latestVersion === "1.
|
|
505937
|
-
writeToStdout(source_default.green(`UR is up to date (${"1.
|
|
506259
|
+
if (latestVersion === "1.16.1") {
|
|
506260
|
+
writeToStdout(source_default.green(`UR is up to date (${"1.16.1"})`) + `
|
|
505938
506261
|
`);
|
|
505939
506262
|
await gracefulShutdown(0);
|
|
505940
506263
|
}
|
|
505941
|
-
writeToStdout(`${formatUpdateAvailableMessage("1.
|
|
506264
|
+
writeToStdout(`${formatUpdateAvailableMessage("1.16.1", latestVersion)}
|
|
505942
506265
|
`);
|
|
505943
506266
|
writeToStdout(`Installing update...
|
|
505944
506267
|
`);
|
|
@@ -505983,7 +506306,7 @@ async function update() {
|
|
|
505983
506306
|
logForDebugging(`update: Installation status: ${status2}`);
|
|
505984
506307
|
switch (status2) {
|
|
505985
506308
|
case "success":
|
|
505986
|
-
writeToStdout(source_default.green(`Successfully updated from ${"1.
|
|
506309
|
+
writeToStdout(source_default.green(`Successfully updated from ${"1.16.1"} to version ${latestVersion}`) + `
|
|
505987
506310
|
`);
|
|
505988
506311
|
await regenerateCompletionCache();
|
|
505989
506312
|
break;
|
|
@@ -506421,7 +506744,7 @@ async function run() {
|
|
|
506421
506744
|
throw new InvalidArgumentError(`It must be one of: ${allowed.join(", ")}`);
|
|
506422
506745
|
}
|
|
506423
506746
|
return value;
|
|
506424
|
-
})).option("--agent <agent>", `Agent for the current session. Overrides the 'agent' setting.`).option("--betas <betas...>", "Beta headers to include in API requests (API key users only)").option("--fallback-model <model>", "Enable automatic fallback to specified model when default model is overloaded (only works with --print)").addOption(new Option("--workload <tag>", "Workload tag for billing-header attribution (cc_workload). Process-scoped; set by SDK daemon callers that spawn subprocesses for cron work. (only works with --print)").hideHelp()).option("--settings <file-or-json>", "Path to a settings JSON file or a JSON string to load additional settings from").option("--add-dir <directories...>", "Additional directories to allow tool access to").option("--ide", "Automatically connect to IDE on startup if exactly one valid IDE is available", () => true).option("--strict-mcp-config", "Only use MCP servers from --mcp-config, ignoring all other MCP configurations", () => true).option("--session-id <uuid>", "Use a specific session ID for the conversation (must be a valid UUID)").option("-n, --name <name>", "Set a display name for this session (shown in /resume and terminal title)").option("--agents <json>", `JSON object defining custom agents (e.g. '{"reviewer": {"description": "Reviews code", "prompt": "You are a code reviewer"}}')`).option("--setting-sources <sources>", "Comma-separated list of setting sources to load (user, project, local).").option("--plugin-dir <path>", "Load plugins from a directory for this session only (repeatable: --plugin-dir A --plugin-dir B)", (val, prev) => [...prev, val], []).option("--disable-slash-commands", "Disable all skills", () => true).option("--chrome", "Enable UR in Chrome integration").option("--no-chrome", "Disable UR in Chrome integration").option("--file <specs...>", "File resources to download at startup. Format: file_id:relative_path (e.g., --file file_abc:doc.txt file_def:img.png)").action(async (prompt, options2) => {
|
|
506747
|
+
})).option("--agent <agent>", `Agent for the current session. Overrides the 'agent' setting.`).option("--betas <betas...>", "Beta headers to include in API requests (API key users only)").option("--fallback-model <model>", "Enable automatic fallback to specified model when default model is overloaded (only works with --print)").addOption(new Option("--workload <tag>", "Workload tag for billing-header attribution (cc_workload). Process-scoped; set by SDK daemon callers that spawn subprocesses for cron work. (only works with --print)").hideHelp()).option("--settings <file-or-json>", "Path to a settings JSON file or a JSON string to load additional settings from").option("--add-dir <directories...>", "Additional directories to allow tool access to").option("--ide", "Automatically connect to IDE on startup if exactly one valid IDE is available", () => true).option("--strict-mcp-config", "Only use MCP servers from --mcp-config, ignoring all other MCP configurations", () => true).option("--session-id <uuid>", "Use a specific session ID for the conversation (must be a valid UUID)").option("-n, --name <name>", "Set a display name for this session (shown in /resume and terminal title)").option("--agents <json>", `JSON object defining custom agents (e.g. '{"reviewer": {"description": "Reviews code", "prompt": "You are a code reviewer"}}')`).option("--setting-sources <sources>", "Comma-separated list of setting sources to load (user, project, local).").option("--discover-ollama", "Discover Ollama servers on the local network and choose one at startup").option("--ollama-host <url>", "Use a specific Ollama server URL for this session (overrides settings and environment)").option("--plugin-dir <path>", "Load plugins from a directory for this session only (repeatable: --plugin-dir A --plugin-dir B)", (val, prev) => [...prev, val], []).option("--disable-slash-commands", "Disable all skills", () => true).option("--chrome", "Enable UR in Chrome integration").option("--no-chrome", "Disable UR in Chrome integration").option("--file <specs...>", "File resources to download at startup. Format: file_id:relative_path (e.g., --file file_abc:doc.txt file_def:img.png)").action(async (prompt, options2) => {
|
|
506425
506748
|
profileCheckpoint("action_handler_start");
|
|
506426
506749
|
if (options2.bare) {
|
|
506427
506750
|
process.env.UR_CODE_SIMPLE = "1";
|
|
@@ -507108,6 +507431,31 @@ ${customInstructions}` : customInstructions;
|
|
|
507108
507431
|
if (!orgValidation.valid) {
|
|
507109
507432
|
await exitWithError2(root2, orgValidation.message);
|
|
507110
507433
|
}
|
|
507434
|
+
if (getAPIProvider() === "ollama") {
|
|
507435
|
+
const ollamaHostOverride = options2.ollamaHost;
|
|
507436
|
+
if (ollamaHostOverride) {
|
|
507437
|
+
setOllamaBaseUrlOverride(ollamaHostOverride);
|
|
507438
|
+
}
|
|
507439
|
+
const discoverFlag = options2.discoverOllama;
|
|
507440
|
+
const lanDiscoverySetting = getSettingsForSource("userSettings")?.ollama?.lanDiscovery;
|
|
507441
|
+
if (discoverFlag || lanDiscoverySetting) {
|
|
507442
|
+
const discovered = await discoverOllamaHosts({
|
|
507443
|
+
signal: AbortSignal.timeout(8000)
|
|
507444
|
+
}).catch(() => []);
|
|
507445
|
+
if (discovered.length > 0 || lanDiscoverySetting) {
|
|
507446
|
+
const currentHost = getOllamaBaseUrl();
|
|
507447
|
+
const {
|
|
507448
|
+
OllamaHostPicker: OllamaHostPicker2
|
|
507449
|
+
} = await Promise.resolve().then(() => (init_OllamaHostPicker(), exports_OllamaHostPicker));
|
|
507450
|
+
const chosenHost = await showSetupDialog(root2, (done) => /* @__PURE__ */ jsx_dev_runtime490.jsxDEV(OllamaHostPicker2, {
|
|
507451
|
+
discovered,
|
|
507452
|
+
currentHost,
|
|
507453
|
+
onSelect: done
|
|
507454
|
+
}, undefined, false, undefined, this));
|
|
507455
|
+
setOllamaBaseUrlOverride(chosenHost);
|
|
507456
|
+
}
|
|
507457
|
+
}
|
|
507458
|
+
}
|
|
507111
507459
|
}
|
|
507112
507460
|
if (process.exitCode !== undefined) {
|
|
507113
507461
|
logForDebugging("Graceful shutdown initiated, skipping further initialization");
|
|
@@ -507234,7 +507582,7 @@ ${customInstructions}` : customInstructions;
|
|
|
507234
507582
|
}
|
|
507235
507583
|
}
|
|
507236
507584
|
logForDiagnosticsNoPII("info", "started", {
|
|
507237
|
-
version: "1.
|
|
507585
|
+
version: "1.16.1",
|
|
507238
507586
|
is_native_binary: isInBundledMode()
|
|
507239
507587
|
});
|
|
507240
507588
|
registerCleanup(async () => {
|
|
@@ -508018,7 +508366,7 @@ Usage: ur --remote "your task description"`, () => gracefulShutdown(1));
|
|
|
508018
508366
|
pendingHookMessages
|
|
508019
508367
|
}, renderAndRun);
|
|
508020
508368
|
}
|
|
508021
|
-
}).version("1.
|
|
508369
|
+
}).version("1.16.1 (Ur)", "-v, --version", "Output the version number");
|
|
508022
508370
|
program2.option("-w, --worktree [name]", "Create a new git worktree for this session (optionally specify a name)");
|
|
508023
508371
|
program2.option("--tmux", "Create a tmux session for the worktree (requires --worktree). Uses iTerm2 native panes when available; use --tmux=classic for traditional tmux.");
|
|
508024
508372
|
if (canUserConfigureAdvisor()) {
|
|
@@ -508587,7 +508935,7 @@ function extractTeammateOptions(options2) {
|
|
|
508587
508935
|
agentType: typeof opts.agentType === "string" ? opts.agentType : undefined
|
|
508588
508936
|
};
|
|
508589
508937
|
}
|
|
508590
|
-
var getTeammateUtils = () => (init_teammate(), __toCommonJS(exports_teammate)), getTeammatePromptAddendum = () => __toCommonJS(exports_teammatePromptAddendum), getTeammateModeSnapshot = () => (init_teammateModeSnapshot(), __toCommonJS(exports_teammateModeSnapshot)), coordinatorModeModule = null, CURRENT_MIGRATION_VERSION = 11;
|
|
508938
|
+
var jsx_dev_runtime490, getTeammateUtils = () => (init_teammate(), __toCommonJS(exports_teammate)), getTeammatePromptAddendum = () => __toCommonJS(exports_teammatePromptAddendum), getTeammateModeSnapshot = () => (init_teammateModeSnapshot(), __toCommonJS(exports_teammateModeSnapshot)), coordinatorModeModule = null, CURRENT_MIGRATION_VERSION = 11;
|
|
508591
508939
|
var init_main3 = __esm(() => {
|
|
508592
508940
|
init_startupProfiler();
|
|
508593
508941
|
init_rawRead();
|
|
@@ -508658,6 +509006,8 @@ var init_main3 = __esm(() => {
|
|
|
508658
509006
|
init_model();
|
|
508659
509007
|
init_modelStrings();
|
|
508660
509008
|
init_ollamaModels();
|
|
509009
|
+
init_ollamaDiscovery();
|
|
509010
|
+
init_ollamaConfig();
|
|
508661
509011
|
init_PermissionMode();
|
|
508662
509012
|
init_permissionSetup();
|
|
508663
509013
|
init_cacheUtils();
|
|
@@ -508731,6 +509081,7 @@ var init_main3 = __esm(() => {
|
|
|
508731
509081
|
init_thinking();
|
|
508732
509082
|
init_user();
|
|
508733
509083
|
init_worktree();
|
|
509084
|
+
jsx_dev_runtime490 = __toESM(require_jsx_dev_runtime(), 1);
|
|
508734
509085
|
profileCheckpoint("main_tsx_entry");
|
|
508735
509086
|
startMdmRawRead();
|
|
508736
509087
|
startKeychainPrefetch();
|
|
@@ -508750,7 +509101,7 @@ if (false) {}
|
|
|
508750
509101
|
async function main2() {
|
|
508751
509102
|
const args = process.argv.slice(2);
|
|
508752
509103
|
if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
|
|
508753
|
-
console.log(`${"1.
|
|
509104
|
+
console.log(`${"1.16.1"} (Ur)`);
|
|
508754
509105
|
return;
|
|
508755
509106
|
}
|
|
508756
509107
|
if (args[0] === "a2a" && args[1] === "serve" && !args.includes("--help") && !args.includes("-h")) {
|