sparkecoder 0.1.16 → 0.1.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/cli.js +15 -6
- package/dist/cli.js.map +1 -1
- package/dist/index.js +9 -2
- package/dist/index.js.map +1 -1
- package/dist/server/index.js +9 -2
- package/dist/server/index.js.map +1 -1
- package/package.json +1 -1
- package/web/.next/BUILD_ID +1 -1
- package/web/.next/standalone/web/.next/BUILD_ID +1 -1
- package/web/.next/standalone/web/.next/build-manifest.json +2 -2
- package/web/.next/standalone/web/.next/prerender-manifest.json +3 -3
- package/web/.next/standalone/web/.next/server/app/(main)/page.js +3 -3
- package/web/.next/standalone/web/.next/server/app/(main)/page.js.nft.json +1 -1
- package/web/.next/standalone/web/.next/server/app/(main)/page_client-reference-manifest.js +1 -1
- package/web/.next/standalone/web/.next/server/app/(main)/session/[id]/page.js +3 -3
- package/web/.next/standalone/web/.next/server/app/(main)/session/[id]/page.js.nft.json +1 -1
- package/web/.next/standalone/web/.next/server/app/(main)/session/[id]/page_client-reference-manifest.js +1 -1
- package/web/.next/standalone/web/.next/server/app/_global-error/page.js +2 -2
- package/web/.next/standalone/web/.next/server/app/_global-error/page.js.nft.json +1 -1
- package/web/.next/standalone/web/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/web/.next/standalone/web/.next/server/app/_global-error.html +2 -2
- package/web/.next/standalone/web/.next/server/app/_global-error.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/_not-found/page.js +3 -3
- package/web/.next/standalone/web/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/web/.next/standalone/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/web/.next/standalone/web/.next/server/app/_not-found.html +1 -1
- package/web/.next/standalone/web/.next/server/app/_not-found.rsc +13 -12
- package/web/.next/standalone/web/.next/server/app/_not-found.segments/_full.segment.rsc +13 -12
- package/web/.next/standalone/web/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/_not-found.segments/_index.segment.rsc +4 -3
- package/web/.next/standalone/web/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/api/config/route.js +1 -1
- package/web/.next/standalone/web/.next/server/app/api/config/route.js.nft.json +1 -1
- package/web/.next/standalone/web/.next/server/app/api/health/route.js +1 -1
- package/web/.next/standalone/web/.next/server/app/api/health/route.js.nft.json +1 -1
- package/web/.next/standalone/web/.next/server/app/index.html +1 -1
- package/web/.next/standalone/web/.next/server/app/index.rsc +20 -19
- package/web/.next/standalone/web/.next/server/app/index.segments/!KG1haW4p/__PAGE__.segment.rsc +2 -2
- package/web/.next/standalone/web/.next/server/app/index.segments/!KG1haW4p.segment.rsc +2 -2
- package/web/.next/standalone/web/.next/server/app/index.segments/_full.segment.rsc +20 -19
- package/web/.next/standalone/web/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/index.segments/_index.segment.rsc +4 -3
- package/web/.next/standalone/web/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/chunks/[root-of-the-server]__36edac7c._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/[root-of-the-server]__74ebc442._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/{2374f_1b669458._.js → 2374f_1d78db71._.js} +1 -1
- package/web/.next/standalone/web/.next/server/chunks/ssr/{2374f_10a13bff._.js → 2374f_30f9df13._.js} +1 -1
- package/web/.next/standalone/web/.next/server/chunks/ssr/{2374f_42ae2ff5._.js → 2374f_378282b1._.js} +1 -1
- package/web/.next/standalone/web/.next/server/chunks/ssr/{2374f_21324e82._.js → 2374f_5de336d2._.js} +1 -1
- package/web/.next/standalone/web/.next/server/chunks/ssr/{2374f_ba57e34a._.js → 2374f_8825dcc9._.js} +1 -1
- package/web/.next/standalone/web/.next/server/chunks/ssr/{2374f_47e888fe._.js → 2374f_9bf3c7f3._.js} +2 -2
- package/web/.next/standalone/web/.next/server/chunks/ssr/{2374f_63823b79._.js → 2374f_bbc99511._.js} +1 -1
- package/web/.next/standalone/web/.next/server/chunks/ssr/{2374f_9c15fcde._.js → 2374f_d94c2b70._.js} +1 -1
- package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__0f6b5fa7._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/{[root-of-the-server]__e1f2996b._.js → [root-of-the-server]__513c6b45._.js} +2 -2
- package/web/.next/standalone/web/.next/server/chunks/ssr/{[root-of-the-server]__da40fb08._.js → [root-of-the-server]__7f04455b._.js} +2 -2
- package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__be5e2967._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/{[root-of-the-server]__10aab2ca._.js → [root-of-the-server]__c3a1e22c._.js} +2 -2
- package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__d2ce4b79._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__de58a952._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__f18f92f4._.js +10 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/{web_d3c9d897._.js → web_19b6934c._.js} +2 -2
- package/web/.next/standalone/web/.next/server/chunks/ssr/web_96bca05b._.js +1 -1
- package/web/.next/standalone/web/.next/server/pages/404.html +1 -1
- package/web/.next/standalone/web/.next/server/pages/500.html +2 -2
- package/web/.next/standalone/web/.next/server/server-reference-manifest.js +1 -1
- package/web/.next/standalone/web/.next/server/server-reference-manifest.json +1 -1
- package/web/.next/standalone/web/.next/static/chunks/25a97bfee12ea1f6.js +1 -0
- package/web/.next/standalone/web/.next/static/chunks/2f9f08f6c6276b0f.js +1 -0
- package/web/.next/{static/chunks/c7e9604ccdb5cb09.js → standalone/web/.next/static/chunks/5ec82ce8f3aabaf0.js} +3 -3
- package/web/.next/standalone/web/.next/static/static/chunks/25a97bfee12ea1f6.js +1 -0
- package/web/.next/standalone/web/.next/static/static/chunks/2f9f08f6c6276b0f.js +1 -0
- package/web/.next/standalone/web/.next/static/{chunks/c7e9604ccdb5cb09.js → static/chunks/5ec82ce8f3aabaf0.js} +3 -3
- package/web/.next/standalone/web/README.md +63 -0
- package/web/.next/standalone/web/components.json +22 -0
- package/web/.next/standalone/web/eslint.config.mjs +18 -0
- package/web/.next/standalone/web/next.config.ts +9 -0
- package/web/.next/standalone/web/package-lock.json +15061 -0
- package/web/.next/standalone/web/postcss.config.mjs +7 -0
- package/web/.next/standalone/web/runtime-config.json +3 -0
- package/web/.next/standalone/web/src/app/(main)/layout.tsx +22 -0
- package/web/.next/standalone/web/src/app/(main)/page.tsx +230 -0
- package/web/.next/standalone/web/src/app/(main)/session/[id]/page.tsx +64 -0
- package/web/.next/standalone/web/src/app/api/config/route.ts +106 -0
- package/web/.next/standalone/web/src/app/api/health/route.ts +63 -0
- package/web/.next/standalone/web/src/app/apple-icon.png +0 -0
- package/web/.next/standalone/web/src/app/favicon.ico +0 -0
- package/web/.next/standalone/web/src/app/globals.css +311 -0
- package/web/.next/standalone/web/src/app/icon.png +0 -0
- package/web/.next/standalone/web/src/app/layout.tsx +100 -0
- package/web/.next/standalone/web/src/app/opengraph-image.png +0 -0
- package/web/.next/standalone/web/src/app/twitter-image.png +0 -0
- package/web/.next/standalone/web/src/components/ai-elements/agent.tsx +141 -0
- package/web/.next/standalone/web/src/components/ai-elements/artifact.tsx +147 -0
- package/web/.next/standalone/web/src/components/ai-elements/attachments.tsx +421 -0
- package/web/.next/standalone/web/src/components/ai-elements/audio-player.tsx +231 -0
- package/web/.next/standalone/web/src/components/ai-elements/bash-tool.tsx +299 -0
- package/web/.next/standalone/web/src/components/ai-elements/canvas.tsx +22 -0
- package/web/.next/standalone/web/src/components/ai-elements/chain-of-thought.tsx +231 -0
- package/web/.next/standalone/web/src/components/ai-elements/checkpoint.tsx +71 -0
- package/web/.next/standalone/web/src/components/ai-elements/code-block.tsx +529 -0
- package/web/.next/standalone/web/src/components/ai-elements/commit.tsx +448 -0
- package/web/.next/standalone/web/src/components/ai-elements/confirmation.tsx +176 -0
- package/web/.next/standalone/web/src/components/ai-elements/connection.tsx +28 -0
- package/web/.next/standalone/web/src/components/ai-elements/context.tsx +408 -0
- package/web/.next/standalone/web/src/components/ai-elements/controls.tsx +18 -0
- package/web/.next/standalone/web/src/components/ai-elements/conversation.tsx +104 -0
- package/web/.next/standalone/web/src/components/ai-elements/edge.tsx +140 -0
- package/web/.next/standalone/web/src/components/ai-elements/environment-variables.tsx +295 -0
- package/web/.next/standalone/web/src/components/ai-elements/file-tree.tsx +258 -0
- package/web/.next/standalone/web/src/components/ai-elements/image.tsx +24 -0
- package/web/.next/standalone/web/src/components/ai-elements/inline-citation.tsx +287 -0
- package/web/.next/standalone/web/src/components/ai-elements/linter-tool.tsx +330 -0
- package/web/.next/standalone/web/src/components/ai-elements/load-skill-tool.tsx +215 -0
- package/web/.next/standalone/web/src/components/ai-elements/loader.tsx +96 -0
- package/web/.next/standalone/web/src/components/ai-elements/message.tsx +421 -0
- package/web/.next/standalone/web/src/components/ai-elements/mic-selector.tsx +370 -0
- package/web/.next/standalone/web/src/components/ai-elements/model-selector.tsx +211 -0
- package/web/.next/standalone/web/src/components/ai-elements/node.tsx +71 -0
- package/web/.next/standalone/web/src/components/ai-elements/open-in-chat.tsx +365 -0
- package/web/.next/standalone/web/src/components/ai-elements/package-info.tsx +233 -0
- package/web/.next/standalone/web/src/components/ai-elements/panel.tsx +15 -0
- package/web/.next/standalone/web/src/components/ai-elements/persona.tsx +270 -0
- package/web/.next/standalone/web/src/components/ai-elements/plan.tsx +142 -0
- package/web/.next/standalone/web/src/components/ai-elements/prompt-input.tsx +1263 -0
- package/web/.next/standalone/web/src/components/ai-elements/queue.tsx +274 -0
- package/web/.next/standalone/web/src/components/ai-elements/read-file-tool.tsx +251 -0
- package/web/.next/standalone/web/src/components/ai-elements/reasoning.tsx +198 -0
- package/web/.next/standalone/web/src/components/ai-elements/sandbox.tsx +131 -0
- package/web/.next/standalone/web/src/components/ai-elements/schema-display.tsx +458 -0
- package/web/.next/standalone/web/src/components/ai-elements/shimmer.tsx +64 -0
- package/web/.next/standalone/web/src/components/ai-elements/snippet.tsx +139 -0
- package/web/.next/standalone/web/src/components/ai-elements/sources.tsx +77 -0
- package/web/.next/standalone/web/src/components/ai-elements/speech-input.tsx +300 -0
- package/web/.next/standalone/web/src/components/ai-elements/stack-trace.tsx +482 -0
- package/web/.next/standalone/web/src/components/ai-elements/suggestion.tsx +60 -0
- package/web/.next/standalone/web/src/components/ai-elements/task.tsx +87 -0
- package/web/.next/standalone/web/src/components/ai-elements/terminal.tsx +261 -0
- package/web/.next/standalone/web/src/components/ai-elements/test-results.tsx +485 -0
- package/web/.next/standalone/web/src/components/ai-elements/todo-panel.tsx +178 -0
- package/web/.next/standalone/web/src/components/ai-elements/todo-tool.tsx +246 -0
- package/web/.next/standalone/web/src/components/ai-elements/tool.tsx +174 -0
- package/web/.next/standalone/web/src/components/ai-elements/toolbar.tsx +16 -0
- package/web/.next/standalone/web/src/components/ai-elements/transcription.tsx +124 -0
- package/web/.next/standalone/web/src/components/ai-elements/voice-selector.tsx +479 -0
- package/web/.next/standalone/web/src/components/ai-elements/web-preview.tsx +263 -0
- package/web/.next/standalone/web/src/components/ai-elements/write-file-tool.tsx +368 -0
- package/web/.next/standalone/web/src/components/api-init.tsx +21 -0
- package/web/.next/standalone/web/src/components/chat-interface.tsx +2074 -0
- package/web/.next/standalone/web/src/components/sessions-sidebar.tsx +875 -0
- package/web/.next/standalone/web/src/components/ui/accordion.tsx +66 -0
- package/web/.next/standalone/web/src/components/ui/alert.tsx +66 -0
- package/web/.next/standalone/web/src/components/ui/avatar.tsx +109 -0
- package/web/.next/standalone/web/src/components/ui/badge.tsx +48 -0
- package/web/.next/standalone/web/src/components/ui/button-group.tsx +83 -0
- package/web/.next/standalone/web/src/components/ui/button.tsx +64 -0
- package/web/.next/standalone/web/src/components/ui/card.tsx +92 -0
- package/web/.next/standalone/web/src/components/ui/carousel.tsx +241 -0
- package/web/.next/standalone/web/src/components/ui/collapsible.tsx +33 -0
- package/web/.next/standalone/web/src/components/ui/command.tsx +184 -0
- package/web/.next/standalone/web/src/components/ui/dialog.tsx +158 -0
- package/web/.next/standalone/web/src/components/ui/dropdown-menu.tsx +257 -0
- package/web/.next/standalone/web/src/components/ui/hover-card.tsx +44 -0
- package/web/.next/standalone/web/src/components/ui/input-group.tsx +170 -0
- package/web/.next/standalone/web/src/components/ui/input.tsx +22 -0
- package/web/.next/standalone/web/src/components/ui/label.tsx +24 -0
- package/web/.next/standalone/web/src/components/ui/popover.tsx +89 -0
- package/web/.next/standalone/web/src/components/ui/progress.tsx +31 -0
- package/web/.next/standalone/web/src/components/ui/scroll-area.tsx +58 -0
- package/web/.next/standalone/web/src/components/ui/select.tsx +190 -0
- package/web/.next/standalone/web/src/components/ui/separator.tsx +28 -0
- package/web/.next/standalone/web/src/components/ui/sheet.tsx +143 -0
- package/web/.next/standalone/web/src/components/ui/sidebar.tsx +726 -0
- package/web/.next/standalone/web/src/components/ui/skeleton.tsx +13 -0
- package/web/.next/standalone/web/src/components/ui/switch.tsx +35 -0
- package/web/.next/standalone/web/src/components/ui/tabs.tsx +91 -0
- package/web/.next/standalone/web/src/components/ui/textarea.tsx +18 -0
- package/web/.next/standalone/web/src/components/ui/tooltip.tsx +61 -0
- package/web/.next/standalone/web/src/hooks/use-mobile.ts +19 -0
- package/web/.next/standalone/web/src/hooks/use-sessions.ts +28 -0
- package/web/.next/standalone/web/src/lib/api.ts +568 -0
- package/web/.next/standalone/web/src/lib/config.ts +178 -0
- package/web/.next/standalone/web/src/lib/utils.ts +6 -0
- package/web/.next/standalone/web/src/test/api.test.ts +125 -0
- package/web/.next/standalone/web/src/test/setup.ts +1 -0
- package/web/.next/standalone/web/tsconfig.json +43 -0
- package/web/.next/standalone/web/vitest.config.ts +17 -0
- package/web/.next/static/chunks/25a97bfee12ea1f6.js +1 -0
- package/web/.next/static/chunks/2f9f08f6c6276b0f.js +1 -0
- package/web/.next/{standalone/web/.next/static/static/chunks/c7e9604ccdb5cb09.js → static/chunks/5ec82ce8f3aabaf0.js} +3 -3
- package/web/.next/standalone/web/.next/server/chunks/[root-of-the-server]__7ba4776a._.js +0 -3
- package/web/.next/standalone/web/.next/server/chunks/[root-of-the-server]__d907af4e._.js +0 -3
- package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__3a7ef2b7._.js +0 -3
- package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__5369f47d._.js +0 -3
- package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__c1f0d54f._.js +0 -3
- package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__fd3d4d25._.js +0 -10
- package/web/.next/standalone/web/.next/static/chunks/85dcb2949e032468.js +0 -1
- package/web/.next/standalone/web/.next/static/static/chunks/85dcb2949e032468.js +0 -1
- package/web/.next/static/chunks/85dcb2949e032468.js +0 -1
- /package/web/.next/standalone/web/.next/static/{3Y3VQCOuXe9_MLEdym2IJ → omR5ZCfnSKddq7WtwIK6Y}/_buildManifest.js +0 -0
- /package/web/.next/standalone/web/.next/static/{3Y3VQCOuXe9_MLEdym2IJ → omR5ZCfnSKddq7WtwIK6Y}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/standalone/web/.next/static/{3Y3VQCOuXe9_MLEdym2IJ → omR5ZCfnSKddq7WtwIK6Y}/_ssgManifest.js +0 -0
- /package/web/.next/standalone/web/.next/static/static/{3Y3VQCOuXe9_MLEdym2IJ → omR5ZCfnSKddq7WtwIK6Y}/_buildManifest.js +0 -0
- /package/web/.next/standalone/web/.next/static/static/{3Y3VQCOuXe9_MLEdym2IJ → omR5ZCfnSKddq7WtwIK6Y}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/standalone/web/.next/static/static/{3Y3VQCOuXe9_MLEdym2IJ → omR5ZCfnSKddq7WtwIK6Y}/_ssgManifest.js +0 -0
- /package/web/.next/static/{3Y3VQCOuXe9_MLEdym2IJ → omR5ZCfnSKddq7WtwIK6Y}/_buildManifest.js +0 -0
- /package/web/.next/static/{3Y3VQCOuXe9_MLEdym2IJ → omR5ZCfnSKddq7WtwIK6Y}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/static/{3Y3VQCOuXe9_MLEdym2IJ → omR5ZCfnSKddq7WtwIK6Y}/_ssgManifest.js +0 -0
package/README.md
CHANGED
|
@@ -335,7 +335,7 @@ sparkecoder start --public-url http://your-server:3141
|
|
|
335
335
|
**Notes:**
|
|
336
336
|
- Set `host` to `0.0.0.0` to bind to all interfaces (required for Docker/remote access)
|
|
337
337
|
- Set `publicUrl` to the URL the browser will use to reach the API
|
|
338
|
-
- The web UI
|
|
338
|
+
- The web UI detects this URL automatically on first load and stores it in localStorage
|
|
339
339
|
|
|
340
340
|
## Development
|
|
341
341
|
|
package/dist/cli.js
CHANGED
|
@@ -18,7 +18,7 @@ import { Hono as Hono5 } from "hono";
|
|
|
18
18
|
import { serve } from "@hono/node-server";
|
|
19
19
|
import { cors } from "hono/cors";
|
|
20
20
|
import { logger } from "hono/logger";
|
|
21
|
-
import { existsSync as existsSync10, mkdirSync as mkdirSync3 } from "fs";
|
|
21
|
+
import { existsSync as existsSync10, mkdirSync as mkdirSync3, writeFileSync as writeFileSync2 } from "fs";
|
|
22
22
|
import { resolve as resolve8, dirname as dirname6, join as join3 } from "path";
|
|
23
23
|
import { spawn as spawn2 } from "child_process";
|
|
24
24
|
import { createServer as createNetServer } from "net";
|
|
@@ -5277,9 +5277,16 @@ async function startWebUI(apiPort, webPort = DEFAULT_WEB_PORT, quiet = false, pu
|
|
|
5277
5277
|
const pkgManager = usePnpm ? "pnpm" : useNpm ? "npm" : "npx";
|
|
5278
5278
|
const { NODE_OPTIONS, TSX_TSCONFIG_PATH, ...cleanEnv } = process.env;
|
|
5279
5279
|
const apiUrl = publicUrl || `http://127.0.0.1:${apiPort}`;
|
|
5280
|
+
const runtimeConfig = { apiBaseUrl: apiUrl };
|
|
5281
|
+
const runtimeConfigPath = join3(webDir, "runtime-config.json");
|
|
5282
|
+
try {
|
|
5283
|
+
writeFileSync2(runtimeConfigPath, JSON.stringify(runtimeConfig, null, 2));
|
|
5284
|
+
if (!quiet) console.log(` \u{1F4DD} Runtime config written to ${runtimeConfigPath}`);
|
|
5285
|
+
} catch (err) {
|
|
5286
|
+
if (!quiet) console.warn(` \u26A0 Could not write runtime config: ${err}`);
|
|
5287
|
+
}
|
|
5280
5288
|
const webEnv = {
|
|
5281
5289
|
...cleanEnv,
|
|
5282
|
-
NEXT_PUBLIC_API_URL: apiUrl,
|
|
5283
5290
|
PORT: String(actualPort)
|
|
5284
5291
|
// Next.js respects PORT env var
|
|
5285
5292
|
};
|
|
@@ -5953,7 +5960,7 @@ function generateOpenAPISpec() {
|
|
|
5953
5960
|
}
|
|
5954
5961
|
|
|
5955
5962
|
// src/cli.ts
|
|
5956
|
-
import { writeFileSync as
|
|
5963
|
+
import { writeFileSync as writeFileSync3, existsSync as existsSync11 } from "fs";
|
|
5957
5964
|
import { resolve as resolve9, join as join4 } from "path";
|
|
5958
5965
|
async function apiRequest(baseUrl, path, options = {}) {
|
|
5959
5966
|
const url = `${baseUrl}${path}`;
|
|
@@ -6148,7 +6155,8 @@ async function runChat(options) {
|
|
|
6148
6155
|
publicUrl: options.publicUrl
|
|
6149
6156
|
});
|
|
6150
6157
|
serverStartedByUs = true;
|
|
6151
|
-
const
|
|
6158
|
+
const webPort = serverResult.webPort || options.webPort || "6969";
|
|
6159
|
+
const webUrl = options.publicUrl ? `http://localhost:${webPort}?apiUrl=${encodeURIComponent(options.publicUrl)}` : `http://localhost:${webPort}`;
|
|
6152
6160
|
if (serverResult.webStarted === false) {
|
|
6153
6161
|
spinner.warn(`Web UI failed to start at ${chalk.cyan(webUrl)}`);
|
|
6154
6162
|
} else {
|
|
@@ -6480,7 +6488,8 @@ program.command("server").description("Start the SparkECoder server (API + Web U
|
|
|
6480
6488
|
quiet: !options.verbose
|
|
6481
6489
|
});
|
|
6482
6490
|
if (webPort) {
|
|
6483
|
-
|
|
6491
|
+
const webUrl = options.publicUrl ? `http://localhost:${webPort}?apiUrl=${encodeURIComponent(options.publicUrl)}` : `http://localhost:${webPort}`;
|
|
6492
|
+
spinner.succeed(chalk.green(`SparkECoder running at ${webUrl}`));
|
|
6484
6493
|
} else {
|
|
6485
6494
|
spinner.succeed(chalk.green(`SparkECoder server running`));
|
|
6486
6495
|
}
|
|
@@ -6521,7 +6530,7 @@ program.command("init").description("Create a sparkecoder.config.json file").opt
|
|
|
6521
6530
|
return;
|
|
6522
6531
|
}
|
|
6523
6532
|
const config = createDefaultConfig();
|
|
6524
|
-
|
|
6533
|
+
writeFileSync3(configPath, JSON.stringify(config, null, 2));
|
|
6525
6534
|
console.log(chalk.green(`\u2713 Created ${configLocation} config`));
|
|
6526
6535
|
console.log(chalk.dim(` ${configPath}`));
|
|
6527
6536
|
console.log(chalk.dim("Set AI_GATEWAY_API_KEY and run sparkecoder to start"));
|