osagent 0.1.33 → 0.1.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +15 -25
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -146190,7 +146190,7 @@ function createContentGeneratorConfig(config2, authType, generationConfig) {
|
|
|
146190
146190
|
};
|
|
146191
146191
|
}
|
|
146192
146192
|
async function createContentGenerator(config2, gcConfig, sessionId2, isInitialAuth) {
|
|
146193
|
-
const version3 = "0.1.
|
|
146193
|
+
const version3 = "0.1.34";
|
|
146194
146194
|
const userAgent2 = `OSAgent/${version3} (${process.platform}; ${process.arch})`;
|
|
146195
146195
|
const baseHeaders = {
|
|
146196
146196
|
"User-Agent": userAgent2
|
|
@@ -246444,7 +246444,7 @@ var require_backend = __commonJS({
|
|
|
246444
246444
|
});
|
|
246445
246445
|
return a._currentValue;
|
|
246446
246446
|
}, "useContext"),
|
|
246447
|
-
useEffect: /* @__PURE__ */ __name(function
|
|
246447
|
+
useEffect: /* @__PURE__ */ __name(function useEffect60(a) {
|
|
246448
246448
|
C();
|
|
246449
246449
|
x.push({
|
|
246450
246450
|
primitive: "Effect",
|
|
@@ -310824,6 +310824,13 @@ function validateAuthMethod(authMethod, mergedSettings) {
|
|
|
310824
310824
|
if (authMethod === AuthType2.OLLAMA_LOCAL) {
|
|
310825
310825
|
return null;
|
|
310826
310826
|
}
|
|
310827
|
+
if (authMethod === AuthType2.USE_GROQ) {
|
|
310828
|
+
const hasApiKey = process.env["GROQ_API_KEY"] || settings.merged.security?.auth?.apiKey;
|
|
310829
|
+
if (!hasApiKey) {
|
|
310830
|
+
return "GROQ_API_KEY environment variable not found. Get your API key at https://console.groq.com/keys";
|
|
310831
|
+
}
|
|
310832
|
+
return null;
|
|
310833
|
+
}
|
|
310827
310834
|
return "Invalid auth method selected.";
|
|
310828
310835
|
}
|
|
310829
310836
|
__name(validateAuthMethod, "validateAuthMethod");
|
|
@@ -316728,7 +316735,7 @@ __name(getPackageJson, "getPackageJson");
|
|
|
316728
316735
|
// packages/cli/src/utils/version.ts
|
|
316729
316736
|
async function getCliVersion() {
|
|
316730
316737
|
const pkgJson = await getPackageJson();
|
|
316731
|
-
return "0.1.
|
|
316738
|
+
return "0.1.34";
|
|
316732
316739
|
}
|
|
316733
316740
|
__name(getCliVersion, "getCliVersion");
|
|
316734
316741
|
|
|
@@ -320897,8 +320904,8 @@ var formatDuration = /* @__PURE__ */ __name((milliseconds) => {
|
|
|
320897
320904
|
|
|
320898
320905
|
// packages/cli/src/generated/git-commit.ts
|
|
320899
320906
|
init_esbuild_shims();
|
|
320900
|
-
var GIT_COMMIT_INFO2 = "
|
|
320901
|
-
var CLI_VERSION2 = "0.1.
|
|
320907
|
+
var GIT_COMMIT_INFO2 = "c980fd6";
|
|
320908
|
+
var CLI_VERSION2 = "0.1.34";
|
|
320902
320909
|
|
|
320903
320910
|
// packages/cli/src/utils/systemInfo.ts
|
|
320904
320911
|
async function getNpmVersion() {
|
|
@@ -357262,7 +357269,7 @@ function OpenAIKeyPrompt({
|
|
|
357262
357269
|
) }),
|
|
357263
357270
|
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(Box_default, { flexGrow: 1, children: /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(Text3, { children: [
|
|
357264
357271
|
currentField === "apiKey" ? "> " : " ",
|
|
357265
|
-
apiKey
|
|
357272
|
+
apiKey ? apiKey.length > 8 ? "\u2022".repeat(apiKey.length - 4) + apiKey.slice(-4) : "\u2022".repeat(apiKey.length) : " "
|
|
357266
357273
|
] }) })
|
|
357267
357274
|
] }),
|
|
357268
357275
|
/* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(Box_default, { marginTop: 1, flexDirection: "row", children: [
|
|
@@ -357323,10 +357330,6 @@ function AuthDialog() {
|
|
|
357323
357330
|
const settings = useSettings();
|
|
357324
357331
|
const [errorMessage, setErrorMessage] = (0, import_react80.useState)(null);
|
|
357325
357332
|
const [selectedIndex, setSelectedIndex] = (0, import_react80.useState)(null);
|
|
357326
|
-
const [version3, setVersion] = (0, import_react80.useState)("...");
|
|
357327
|
-
(0, import_react80.useEffect)(() => {
|
|
357328
|
-
getCliVersion().then(setVersion);
|
|
357329
|
-
}, []);
|
|
357330
357333
|
const items = [
|
|
357331
357334
|
{
|
|
357332
357335
|
key: AuthType2.OLLAMA_CLOUD,
|
|
@@ -357405,20 +357408,6 @@ function AuthDialog() {
|
|
|
357405
357408
|
padding: 1,
|
|
357406
357409
|
width: "100%",
|
|
357407
357410
|
children: [
|
|
357408
|
-
/* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(Box_default, { flexDirection: "column", alignItems: "center", marginBottom: 1, children: [
|
|
357409
|
-
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(Text3, { bold: true, color: Colors.AccentCyan, children: "\u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557" }),
|
|
357410
|
-
/* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(Text3, { bold: true, color: Colors.AccentCyan, children: [
|
|
357411
|
-
"\u2551 ",
|
|
357412
|
-
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(Text3, { color: Colors.AccentGreen, bold: true, children: "OSAgent" }),
|
|
357413
|
-
" \u2551"
|
|
357414
|
-
] }),
|
|
357415
|
-
/* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(Text3, { bold: true, color: Colors.AccentCyan, children: [
|
|
357416
|
-
"\u2551 AI Coding Assistant v",
|
|
357417
|
-
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(Text3, { color: Colors.AccentYellow, children: version3 }),
|
|
357418
|
-
" \u2551"
|
|
357419
|
-
] }),
|
|
357420
|
-
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(Text3, { bold: true, color: Colors.AccentCyan, children: "\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D" })
|
|
357421
|
-
] }),
|
|
357422
357411
|
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(Text3, { bold: true, color: Colors.Foreground, children: t2("Select Authentication Method") }),
|
|
357423
357412
|
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(Text3, { color: Colors.Gray, children: t2("Choose how to connect to AI models:") }) }),
|
|
357424
357413
|
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(Box_default, { marginTop: 1, children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
@@ -362345,7 +362334,8 @@ var useAuthCommand = /* @__PURE__ */ __name((settings, config2, addItem) => {
|
|
|
362345
362334
|
AuthType2.OSA_OAUTH,
|
|
362346
362335
|
AuthType2.USE_OPENAI,
|
|
362347
362336
|
AuthType2.OLLAMA_CLOUD,
|
|
362348
|
-
AuthType2.OLLAMA_LOCAL
|
|
362337
|
+
AuthType2.OLLAMA_LOCAL,
|
|
362338
|
+
AuthType2.USE_GROQ
|
|
362349
362339
|
];
|
|
362350
362340
|
if (defaultAuthType && !validAuthTypes.includes(defaultAuthType)) {
|
|
362351
362341
|
onAuthError(
|