@autoglm.js/cli 0.0.2-beta.3 → 0.0.2-beta.4
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/index.mjs +13 -12
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -16,7 +16,7 @@ import Gradient from "ink-gradient";
|
|
|
16
16
|
import { ScrollList } from "ink-scroll-list";
|
|
17
17
|
import { create } from "zustand";
|
|
18
18
|
import TextInput from "ink-text-input";
|
|
19
|
-
import
|
|
19
|
+
import autoglmPackage from "autoglm.js/package.json" with { type: "json" };
|
|
20
20
|
|
|
21
21
|
//#region rolldown:runtime
|
|
22
22
|
var __create = Object.create;
|
|
@@ -2653,7 +2653,7 @@ function AgentProvider({ children, config: config$1 }) {
|
|
|
2653
2653
|
const [isRunning, setIsRunning] = useState(false);
|
|
2654
2654
|
const [currentTask, setCurrentTask] = useState(null);
|
|
2655
2655
|
const [events, setEvents] = useState([]);
|
|
2656
|
-
const [version$
|
|
2656
|
+
const [version$2, setVersion] = useState("Loading...");
|
|
2657
2657
|
const [devices, setDevices] = useState([]);
|
|
2658
2658
|
const [systemCheck, setSystemCheck] = useState(null);
|
|
2659
2659
|
const [apiCheck, setApiCheck] = useState(null);
|
|
@@ -2740,7 +2740,7 @@ function AgentProvider({ children, config: config$1 }) {
|
|
|
2740
2740
|
}, []);
|
|
2741
2741
|
const value = {
|
|
2742
2742
|
events,
|
|
2743
|
-
version: version$
|
|
2743
|
+
version: version$2,
|
|
2744
2744
|
devices,
|
|
2745
2745
|
apiCheck,
|
|
2746
2746
|
isRunning,
|
|
@@ -2962,7 +2962,7 @@ function CommandMenuContainer() {
|
|
|
2962
2962
|
//#endregion
|
|
2963
2963
|
//#region src/hooks/useAutoGLM.ts
|
|
2964
2964
|
function useDeviceInfo() {
|
|
2965
|
-
const { devices, version: version$
|
|
2965
|
+
const { devices, version: version$2, refreshDevices, currentDeviceId } = useAgentContext();
|
|
2966
2966
|
const [isRefreshing, setIsRefreshing] = useState(false);
|
|
2967
2967
|
const refresh = useCallback(async () => {
|
|
2968
2968
|
setIsRefreshing(true);
|
|
@@ -2975,7 +2975,7 @@ function useDeviceInfo() {
|
|
|
2975
2975
|
const currentDevice = devices.find((device) => device.deviceId === currentDeviceId) ?? null;
|
|
2976
2976
|
return {
|
|
2977
2977
|
devices,
|
|
2978
|
-
version: version$
|
|
2978
|
+
version: version$2,
|
|
2979
2979
|
isRefreshing,
|
|
2980
2980
|
refresh,
|
|
2981
2981
|
hasDevices: devices.length > 0,
|
|
@@ -3044,7 +3044,7 @@ function SystemStatus() {
|
|
|
3044
3044
|
//#endregion
|
|
3045
3045
|
//#region src/components/Info.tsx
|
|
3046
3046
|
function Info() {
|
|
3047
|
-
const { version: version$
|
|
3047
|
+
const { version: version$2, hasDevices, currentDevice } = useDeviceInfo();
|
|
3048
3048
|
return /* @__PURE__ */ jsxs(Box, {
|
|
3049
3049
|
justifyContent: "space-between",
|
|
3050
3050
|
children: [/* @__PURE__ */ jsxs(Box, {
|
|
@@ -3083,7 +3083,7 @@ function Info() {
|
|
|
3083
3083
|
}), /* @__PURE__ */ jsxs(Text, {
|
|
3084
3084
|
color: "white",
|
|
3085
3085
|
bold: true,
|
|
3086
|
-
children: [" ", version$
|
|
3086
|
+
children: [" ", version$2]
|
|
3087
3087
|
})] })]
|
|
3088
3088
|
}), /* @__PURE__ */ jsx(SystemStatus, {})]
|
|
3089
3089
|
});
|
|
@@ -3183,10 +3183,11 @@ var App_default = App;
|
|
|
3183
3183
|
|
|
3184
3184
|
//#endregion
|
|
3185
3185
|
//#region package.json
|
|
3186
|
-
var version$
|
|
3186
|
+
var version$1 = "0.0.2-beta.4";
|
|
3187
3187
|
|
|
3188
3188
|
//#endregion
|
|
3189
3189
|
//#region src/pages/Version.tsx
|
|
3190
|
+
const { version: coreVersion } = autoglmPackage;
|
|
3190
3191
|
const EMOJI_SEQUENCE = [
|
|
3191
3192
|
"🚀",
|
|
3192
3193
|
"✨",
|
|
@@ -3277,7 +3278,7 @@ function VersionPage({ onExit }) {
|
|
|
3277
3278
|
name: "teen",
|
|
3278
3279
|
children: /* @__PURE__ */ jsxs(Text, {
|
|
3279
3280
|
bold: true,
|
|
3280
|
-
children: ["v", version$
|
|
3281
|
+
children: ["v", version$1]
|
|
3281
3282
|
})
|
|
3282
3283
|
}),
|
|
3283
3284
|
/* @__PURE__ */ jsx(Text, {
|
|
@@ -3293,7 +3294,7 @@ function VersionPage({ onExit }) {
|
|
|
3293
3294
|
name: "pastel",
|
|
3294
3295
|
children: /* @__PURE__ */ jsxs(Text, {
|
|
3295
3296
|
bold: true,
|
|
3296
|
-
children: ["v",
|
|
3297
|
+
children: ["v", coreVersion]
|
|
3297
3298
|
})
|
|
3298
3299
|
})
|
|
3299
3300
|
] })
|
|
@@ -3323,8 +3324,8 @@ function VersionPage({ onExit }) {
|
|
|
3323
3324
|
|
|
3324
3325
|
//#endregion
|
|
3325
3326
|
//#region src/index.tsx
|
|
3326
|
-
const { version
|
|
3327
|
-
if (version
|
|
3327
|
+
const { version } = (0, import_minimist.default)(process$1.argv.slice(2), { alias: { version: ["v", "V"] } });
|
|
3328
|
+
if (version) render(/* @__PURE__ */ jsx(VersionPage, { onExit: () => process$1.exit(0) }));
|
|
3328
3329
|
else render(/* @__PURE__ */ jsx(App_default, {}));
|
|
3329
3330
|
|
|
3330
3331
|
//#endregion
|