veryfront 0.1.13 → 0.1.14
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/esm/cli/app/data/slug-words.d.ts.map +1 -1
- package/esm/cli/app/data/slug-words.js +225 -90
- package/esm/cli/app/operations/project-creation.js +4 -3
- package/esm/cli/app/shell.js +1 -1
- package/esm/cli/app/utils.d.ts +5 -4
- package/esm/cli/app/utils.d.ts.map +1 -1
- package/esm/cli/app/utils.js +0 -23
- package/esm/cli/app/views/dashboard.d.ts +1 -1
- package/esm/cli/app/views/dashboard.d.ts.map +1 -1
- package/esm/cli/app/views/dashboard.js +22 -4
- package/esm/cli/auth/callback-server.d.ts.map +1 -1
- package/esm/cli/auth/callback-server.js +3 -2
- package/esm/cli/commands/dev/handler.d.ts.map +1 -1
- package/esm/cli/commands/dev/handler.js +2 -0
- package/esm/cli/commands/init/init-command.d.ts.map +1 -1
- package/esm/cli/commands/init/init-command.js +20 -3
- package/esm/cli/commands/init/interactive-wizard.d.ts +3 -2
- package/esm/cli/commands/init/interactive-wizard.d.ts.map +1 -1
- package/esm/cli/commands/init/interactive-wizard.js +55 -27
- package/esm/cli/mcp/remote-file-tools.d.ts +0 -6
- package/esm/cli/mcp/remote-file-tools.d.ts.map +1 -1
- package/esm/cli/mcp/remote-file-tools.js +37 -15
- package/esm/cli/shared/reserve-slug.d.ts.map +1 -1
- package/esm/cli/shared/reserve-slug.js +8 -3
- package/esm/cli/utils/env-prompt.d.ts.map +1 -1
- package/esm/cli/utils/env-prompt.js +3 -0
- package/esm/deno.d.ts +2 -1
- package/esm/deno.js +8 -4
- package/esm/src/agent/chat-handler.d.ts +4 -3
- package/esm/src/agent/chat-handler.d.ts.map +1 -1
- package/esm/src/agent/chat-handler.js +55 -4
- package/esm/src/agent/react/index.d.ts +1 -1
- package/esm/src/agent/react/index.d.ts.map +1 -1
- package/esm/src/agent/react/use-chat/browser-inference/browser-engine.d.ts +18 -0
- package/esm/src/agent/react/use-chat/browser-inference/browser-engine.d.ts.map +1 -0
- package/esm/src/agent/react/use-chat/browser-inference/browser-engine.js +54 -0
- package/esm/src/agent/react/use-chat/browser-inference/types.d.ts +43 -0
- package/esm/src/agent/react/use-chat/browser-inference/types.d.ts.map +1 -0
- package/esm/src/agent/react/use-chat/browser-inference/types.js +4 -0
- package/esm/src/agent/react/use-chat/browser-inference/worker-client.d.ts +23 -0
- package/esm/src/agent/react/use-chat/browser-inference/worker-client.d.ts.map +1 -0
- package/esm/src/agent/react/use-chat/browser-inference/worker-client.js +67 -0
- package/esm/src/agent/react/use-chat/browser-inference/worker-script.d.ts +8 -0
- package/esm/src/agent/react/use-chat/browser-inference/worker-script.d.ts.map +1 -0
- package/esm/src/agent/react/use-chat/browser-inference/worker-script.js +97 -0
- package/esm/src/agent/react/use-chat/index.d.ts +1 -1
- package/esm/src/agent/react/use-chat/index.d.ts.map +1 -1
- package/esm/src/agent/react/use-chat/types.d.ts +12 -0
- package/esm/src/agent/react/use-chat/types.d.ts.map +1 -1
- package/esm/src/agent/react/use-chat/use-chat.d.ts.map +1 -1
- package/esm/src/agent/react/use-chat/use-chat.js +120 -6
- package/esm/src/agent/runtime/index.d.ts.map +1 -1
- package/esm/src/agent/runtime/index.js +59 -7
- package/esm/src/build/production-build/templates.d.ts +2 -2
- package/esm/src/build/production-build/templates.d.ts.map +1 -1
- package/esm/src/build/production-build/templates.js +2 -68
- package/esm/src/chat/index.d.ts +1 -1
- package/esm/src/chat/index.d.ts.map +1 -1
- package/esm/src/errors/veryfront-error.d.ts +3 -0
- package/esm/src/errors/veryfront-error.d.ts.map +1 -1
- package/esm/src/platform/adapters/runtime/deno/adapter.d.ts.map +1 -1
- package/esm/src/platform/adapters/runtime/deno/adapter.js +5 -1
- package/esm/src/platform/compat/http/deno-server.d.ts.map +1 -1
- package/esm/src/platform/compat/http/deno-server.js +3 -2
- package/esm/src/provider/index.d.ts +1 -1
- package/esm/src/provider/index.d.ts.map +1 -1
- package/esm/src/provider/index.js +1 -1
- package/esm/src/provider/local/ai-sdk-adapter.d.ts +19 -0
- package/esm/src/provider/local/ai-sdk-adapter.d.ts.map +1 -0
- package/esm/src/provider/local/ai-sdk-adapter.js +164 -0
- package/esm/src/provider/local/env.d.ts +10 -0
- package/esm/src/provider/local/env.d.ts.map +1 -0
- package/esm/src/provider/local/env.js +23 -0
- package/esm/src/provider/local/local-engine.d.ts +61 -0
- package/esm/src/provider/local/local-engine.d.ts.map +1 -0
- package/esm/src/provider/local/local-engine.js +211 -0
- package/esm/src/provider/local/model-catalog.d.ts +30 -0
- package/esm/src/provider/local/model-catalog.d.ts.map +1 -0
- package/esm/src/provider/local/model-catalog.js +58 -0
- package/esm/src/provider/model-registry.d.ts +14 -0
- package/esm/src/provider/model-registry.d.ts.map +1 -1
- package/esm/src/provider/model-registry.js +58 -2
- package/esm/src/proxy/main.js +34 -6
- package/esm/src/proxy/server-resolver.d.ts +23 -0
- package/esm/src/proxy/server-resolver.d.ts.map +1 -0
- package/esm/src/proxy/server-resolver.js +124 -0
- package/esm/src/react/components/ai/chat/components/inference-badge.d.ts +8 -0
- package/esm/src/react/components/ai/chat/components/inference-badge.d.ts.map +1 -0
- package/esm/src/react/components/ai/chat/components/inference-badge.js +36 -0
- package/esm/src/react/components/ai/chat/components/upgrade-cta.d.ts +7 -0
- package/esm/src/react/components/ai/chat/components/upgrade-cta.d.ts.map +1 -0
- package/esm/src/react/components/ai/chat/components/upgrade-cta.js +33 -0
- package/esm/src/react/components/ai/chat/index.d.ts +7 -1
- package/esm/src/react/components/ai/chat/index.d.ts.map +1 -1
- package/esm/src/react/components/ai/chat/index.js +16 -4
- package/package.json +5 -1
- package/src/cli/app/data/slug-words.ts +225 -90
- package/src/cli/app/operations/project-creation.ts +3 -3
- package/src/cli/app/shell.ts +1 -1
- package/src/cli/app/utils.ts +0 -30
- package/src/cli/app/views/dashboard.ts +27 -4
- package/src/cli/auth/callback-server.ts +3 -2
- package/src/cli/commands/dev/handler.ts +2 -0
- package/src/cli/commands/init/init-command.ts +30 -3
- package/src/cli/commands/init/interactive-wizard.ts +62 -34
- package/src/cli/mcp/remote-file-tools.ts +50 -15
- package/src/cli/shared/reserve-slug.ts +9 -2
- package/src/cli/utils/env-prompt.ts +3 -0
- package/src/deno.js +8 -4
- package/src/src/agent/chat-handler.ts +57 -4
- package/src/src/agent/react/index.ts +2 -0
- package/src/src/agent/react/use-chat/browser-inference/browser-engine.ts +81 -0
- package/src/src/agent/react/use-chat/browser-inference/types.ts +52 -0
- package/src/src/agent/react/use-chat/browser-inference/worker-client.ts +89 -0
- package/src/src/agent/react/use-chat/browser-inference/worker-script.ts +98 -0
- package/src/src/agent/react/use-chat/index.ts +2 -0
- package/src/src/agent/react/use-chat/types.ts +20 -0
- package/src/src/agent/react/use-chat/use-chat.ts +148 -8
- package/src/src/agent/runtime/index.ts +72 -6
- package/src/src/build/production-build/templates.ts +2 -68
- package/src/src/chat/index.ts +2 -0
- package/src/src/errors/veryfront-error.ts +2 -1
- package/src/src/platform/adapters/runtime/deno/adapter.ts +5 -1
- package/src/src/platform/compat/http/deno-server.ts +3 -1
- package/src/src/provider/index.ts +1 -0
- package/src/src/provider/local/ai-sdk-adapter.ts +207 -0
- package/src/src/provider/local/env.ts +26 -0
- package/src/src/provider/local/local-engine.ts +288 -0
- package/src/src/provider/local/model-catalog.ts +73 -0
- package/src/src/provider/model-registry.ts +66 -2
- package/src/src/proxy/main.ts +41 -6
- package/src/src/proxy/server-resolver.ts +151 -0
- package/src/src/react/components/ai/chat/components/inference-badge.tsx +48 -0
- package/src/src/react/components/ai/chat/components/upgrade-cta.tsx +56 -0
- package/src/src/react/components/ai/chat/index.tsx +43 -6
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export function InferenceBadge({ inferenceMode, browserStatus, }) {
|
|
3
|
+
if (inferenceMode === "cloud")
|
|
4
|
+
return null;
|
|
5
|
+
let label;
|
|
6
|
+
let dotColor;
|
|
7
|
+
let showProgress = false;
|
|
8
|
+
if (inferenceMode === "server-local") {
|
|
9
|
+
label = "Running locally";
|
|
10
|
+
dotColor = "bg-green-500";
|
|
11
|
+
}
|
|
12
|
+
else if (browserStatus === "downloading-model") {
|
|
13
|
+
label = "Downloading model...";
|
|
14
|
+
dotColor = "bg-amber-500";
|
|
15
|
+
showProgress = true;
|
|
16
|
+
}
|
|
17
|
+
else if (browserStatus === "loading-runtime") {
|
|
18
|
+
label = "Loading AI runtime...";
|
|
19
|
+
dotColor = "bg-amber-500";
|
|
20
|
+
}
|
|
21
|
+
else if (browserStatus === "generating") {
|
|
22
|
+
label = "Running in browser";
|
|
23
|
+
dotColor = "bg-green-500";
|
|
24
|
+
}
|
|
25
|
+
else if (browserStatus === "error") {
|
|
26
|
+
label = "Local model failed";
|
|
27
|
+
dotColor = "bg-red-500";
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
label = "Running locally";
|
|
31
|
+
dotColor = "bg-green-500";
|
|
32
|
+
}
|
|
33
|
+
return (React.createElement("div", { className: "flex items-center gap-1.5 px-3 py-1 text-xs text-neutral-500 dark:text-neutral-400" },
|
|
34
|
+
React.createElement("span", { className: `size-1.5 rounded-full ${dotColor} ${showProgress ? "animate-pulse" : ""}` }),
|
|
35
|
+
React.createElement("span", null, label)));
|
|
36
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { InferenceMode } from "../../../../../agent/react/index.js";
|
|
3
|
+
export interface UpgradeCTAProps {
|
|
4
|
+
inferenceMode: InferenceMode;
|
|
5
|
+
}
|
|
6
|
+
export declare function UpgradeCTA({ inferenceMode }: UpgradeCTAProps): React.ReactElement | null;
|
|
7
|
+
//# sourceMappingURL=upgrade-cta.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upgrade-cta.d.ts","sourceRoot":"","sources":["../../../../../../../src/src/react/components/ai/chat/components/upgrade-cta.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAIzE,MAAM,WAAW,eAAe;IAC9B,aAAa,EAAE,aAAa,CAAC;CAC9B;AAED,wBAAgB,UAAU,CAAC,EAAE,aAAa,EAAE,EAAE,eAAe,GAAG,KAAK,CAAC,YAAY,GAAG,IAAI,CA8CxF"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
const DISMISS_KEY = "vf-upgrade-cta-dismissed";
|
|
3
|
+
export function UpgradeCTA({ inferenceMode }) {
|
|
4
|
+
const [dismissed, setDismissed] = React.useState(() => {
|
|
5
|
+
try {
|
|
6
|
+
return localStorage.getItem(DISMISS_KEY) === "1";
|
|
7
|
+
}
|
|
8
|
+
catch {
|
|
9
|
+
return false;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
if (inferenceMode === "cloud" || dismissed)
|
|
13
|
+
return null;
|
|
14
|
+
const handleDismiss = () => {
|
|
15
|
+
setDismissed(true);
|
|
16
|
+
try {
|
|
17
|
+
localStorage.setItem(DISMISS_KEY, "1");
|
|
18
|
+
}
|
|
19
|
+
catch {
|
|
20
|
+
// localStorage may be unavailable
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
return (React.createElement("div", { className: "w-full max-w-2xl mx-auto mt-4 px-4 py-3 bg-blue-50 dark:bg-blue-900/20 rounded-xl text-sm text-blue-700 dark:text-blue-300 flex items-start gap-3" },
|
|
24
|
+
React.createElement("span", { className: "flex-1" },
|
|
25
|
+
"Using a lightweight local model. Add an API key to your",
|
|
26
|
+
" ",
|
|
27
|
+
React.createElement("code", { className: "px-1 py-0.5 bg-blue-100 dark:bg-blue-900/40 rounded text-xs" }, ".env"),
|
|
28
|
+
" ",
|
|
29
|
+
"for GPT-4o or Claude."),
|
|
30
|
+
React.createElement("button", { type: "button", onClick: handleDismiss, className: "text-blue-400 hover:text-blue-600 dark:hover:text-blue-200 transition-colors flex-shrink-0", "aria-label": "Dismiss" },
|
|
31
|
+
React.createElement("svg", { className: "size-4", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "2" },
|
|
32
|
+
React.createElement("path", { d: "M4 4l8 8M12 4l-8 8" })))));
|
|
33
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import type { DynamicToolUIPart, ToolUIPart, UIMessage } from "../../../../agent/react/index.js";
|
|
2
|
+
import type { BrowserInferenceStatus, DynamicToolUIPart, InferenceMode, ToolUIPart, UIMessage } from "../../../../agent/react/index.js";
|
|
3
3
|
import { type ChatTheme } from "../theme.js";
|
|
4
4
|
import { type ModelOption } from "../model-selector.js";
|
|
5
5
|
export { Loader, Shimmer } from "./components/animations.js";
|
|
@@ -7,6 +7,8 @@ export { ReasoningCard } from "./components/reasoning.js";
|
|
|
7
7
|
export { ConversationEmptyState, type ConversationEmptyStateProps, ConversationScrollButton, type ConversationScrollButtonProps, Suggestion, type SuggestionProps, Suggestions, type SuggestionsProps, } from "./components/empty-state.js";
|
|
8
8
|
export { MessageActions, type MessageActionsProps } from "./components/message-actions.js";
|
|
9
9
|
export { ToolCallCard, ToolStatusBadge } from "./components/tool-ui.js";
|
|
10
|
+
export { InferenceBadge, type InferenceBadgeProps } from "./components/inference-badge.js";
|
|
11
|
+
export { UpgradeCTA, type UpgradeCTAProps } from "./components/upgrade-cta.js";
|
|
10
12
|
export { getTextContent, groupPartsInOrder, isReasoningPart, isToolPart, type PartGroup, } from "./utils/message-parts.js";
|
|
11
13
|
export { ChatFooter, ChatHeader, ChatInput, ChatMessages } from "./composition/api.js";
|
|
12
14
|
export interface ChatProps {
|
|
@@ -45,6 +47,10 @@ export interface ChatProps {
|
|
|
45
47
|
model?: string;
|
|
46
48
|
/** Called when user changes model */
|
|
47
49
|
onModelChange?: (model: string) => void;
|
|
50
|
+
/** Where inference is currently happening */
|
|
51
|
+
inferenceMode?: InferenceMode;
|
|
52
|
+
/** Browser-side model loading/inference status */
|
|
53
|
+
browserStatus?: BrowserInferenceStatus | null;
|
|
48
54
|
}
|
|
49
55
|
export declare const Chat: any;
|
|
50
56
|
export declare const ChatComponents: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/src/react/components/ai/chat/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAS/B,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/src/react/components/ai/chat/index.tsx"],"names":[],"mappings":"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"}
|
|
@@ -10,6 +10,8 @@ export { ReasoningCard } from "./components/reasoning.js";
|
|
|
10
10
|
export { ConversationEmptyState, ConversationScrollButton, Suggestion, Suggestions, } from "./components/empty-state.js";
|
|
11
11
|
export { MessageActions } from "./components/message-actions.js";
|
|
12
12
|
export { ToolCallCard, ToolStatusBadge } from "./components/tool-ui.js";
|
|
13
|
+
export { InferenceBadge } from "./components/inference-badge.js";
|
|
14
|
+
export { UpgradeCTA } from "./components/upgrade-cta.js";
|
|
13
15
|
export { getTextContent, groupPartsInOrder, isReasoningPart, isToolPart, } from "./utils/message-parts.js";
|
|
14
16
|
export { ChatFooter, ChatHeader, ChatInput, ChatMessages } from "./composition/api.js";
|
|
15
17
|
import { ChatFooter, ChatHeader, ChatInput, ChatMessages } from "./composition/api.js";
|
|
@@ -17,8 +19,10 @@ import { ConversationEmptyState, ConversationScrollButton, Suggestion, Suggestio
|
|
|
17
19
|
import { MessageActions } from "./components/message-actions.js";
|
|
18
20
|
import { ReasoningCard } from "./components/reasoning.js";
|
|
19
21
|
import { ToolCallCard } from "./components/tool-ui.js";
|
|
22
|
+
import { InferenceBadge } from "./components/inference-badge.js";
|
|
23
|
+
import { UpgradeCTA } from "./components/upgrade-cta.js";
|
|
20
24
|
import { getTextContent, groupPartsInOrder } from "./utils/message-parts.js";
|
|
21
|
-
export const Chat = React.forwardRef(function Chat({ messages, input, onChange, handleInputChange, onSubmit, handleSubmit, stop, reload, enableVoice = false, onVoice, setInput, isLoading, error, placeholder = "Type a message...", maxHeight = "100%", className, theme: userTheme, renderMessage, renderTool, multiline = false, suggestions, onSuggestionClick, emptyState, showScrollButton = false, showMessageActions = true, models, model, onModelChange, }, ref) {
|
|
25
|
+
export const Chat = React.forwardRef(function Chat({ messages, input, onChange, handleInputChange, onSubmit, handleSubmit, stop, reload, enableVoice = false, onVoice, setInput, isLoading, error, placeholder = "Type a message...", maxHeight = "100%", className, theme: userTheme, renderMessage, renderTool, multiline = false, suggestions, onSuggestionClick, emptyState, showScrollButton = false, showMessageActions = true, models, model, onModelChange, inferenceMode, browserStatus, }, ref) {
|
|
22
26
|
const theme = mergeThemes(defaultChatTheme, userTheme);
|
|
23
27
|
const messagesEndRef = React.useRef(null);
|
|
24
28
|
const inputChangeHandler = onChange ?? handleInputChange ?? (() => { });
|
|
@@ -50,6 +54,7 @@ export const Chat = React.forwardRef(function Chat({ messages, input, onChange,
|
|
|
50
54
|
React.createElement(ConversationEmptyState, { icon: emptyState?.icon ?? React.createElement(MessageSquareIcon, { className: "size-10" }), title: emptyState?.title ?? "What can I help with?", description: emptyState?.description }),
|
|
51
55
|
showSuggestions && (React.createElement("div", { className: "w-full max-w-2xl mt-6 mb-8" },
|
|
52
56
|
React.createElement(Suggestions, { layout: "grid" }, suggestions?.map((suggestion) => (React.createElement(Suggestion, { key: suggestion, suggestion: suggestion, onClick: onSuggestionClick })))))),
|
|
57
|
+
inferenceMode && inferenceMode !== "cloud" && (React.createElement(UpgradeCTA, { inferenceMode: inferenceMode })),
|
|
53
58
|
React.createElement("div", { className: "flex-1" })))
|
|
54
59
|
: (React.createElement("div", { className: "max-w-2xl mx-auto px-4 py-4 space-y-2" },
|
|
55
60
|
messages.map((msg) => {
|
|
@@ -80,11 +85,16 @@ export const Chat = React.forwardRef(function Chat({ messages, input, onChange,
|
|
|
80
85
|
showMessageActions && textContent && (React.createElement(MessageActions, { content: textContent })))));
|
|
81
86
|
}),
|
|
82
87
|
isLoading && (React.createElement("div", { className: "flex justify-start" },
|
|
83
|
-
React.createElement("div", { className: "bg-neutral-100 dark:bg-neutral-800 rounded-[20px] rounded-bl-[4px] px-4 py-3" },
|
|
84
|
-
React.createElement("div", { className: "flex gap-
|
|
88
|
+
React.createElement("div", { className: "bg-neutral-100 dark:bg-neutral-800 rounded-[20px] rounded-bl-[4px] px-4 py-3" }, browserStatus === "downloading-model" || browserStatus === "loading-runtime"
|
|
89
|
+
? (React.createElement("div", { className: "flex items-center gap-2 text-xs text-neutral-500 dark:text-neutral-400" },
|
|
90
|
+
React.createElement("span", { className: "size-1.5 rounded-full bg-amber-500 animate-pulse" }),
|
|
91
|
+
React.createElement("span", null, browserStatus === "downloading-model"
|
|
92
|
+
? "Downloading model..."
|
|
93
|
+
: "Loading AI...")))
|
|
94
|
+
: (React.createElement("div", { className: "flex gap-1.5 items-center" },
|
|
85
95
|
React.createElement("span", { className: cn(theme.loading) }),
|
|
86
96
|
React.createElement("span", { className: cn(theme.loading), style: { animationDelay: "0.15s" } }),
|
|
87
|
-
React.createElement("span", { className: cn(theme.loading), style: { animationDelay: "0.3s" } }))))),
|
|
97
|
+
React.createElement("span", { className: cn(theme.loading), style: { animationDelay: "0.3s" } })))))),
|
|
88
98
|
React.createElement("div", { ref: messagesEndRef }))),
|
|
89
99
|
showScrollButton && (React.createElement(ConversationScrollButton, { onClick: () => messagesEndRef.current?.scrollIntoView({ behavior: "smooth" }) }))),
|
|
90
100
|
error && (React.createElement("div", { className: "max-w-2xl mx-auto px-4 pb-2" },
|
|
@@ -94,6 +104,8 @@ export const Chat = React.forwardRef(function Chat({ messages, input, onChange,
|
|
|
94
104
|
React.createElement(RefreshCwIcon, { className: "size-3" }),
|
|
95
105
|
"Retry"))))),
|
|
96
106
|
React.createElement("div", { className: "flex-shrink-0 bg-white dark:bg-neutral-900 border-t border-neutral-200 dark:border-neutral-800" },
|
|
107
|
+
inferenceMode && inferenceMode !== "cloud" && (React.createElement("div", { className: "max-w-2xl mx-auto" },
|
|
108
|
+
React.createElement(InferenceBadge, { inferenceMode: inferenceMode, browserStatus: browserStatus }))),
|
|
97
109
|
React.createElement("form", { onSubmit: submitHandler, className: "max-w-2xl mx-auto px-4 py-3" },
|
|
98
110
|
models && models.length > 0 && onModelChange && (React.createElement("div", { className: "mb-2" },
|
|
99
111
|
React.createElement(ModelSelector, { models: models, value: model, onChange: onModelChange, disabled: isLoading }))),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "veryfront",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.14",
|
|
4
4
|
"description": "The simplest way to build AI-powered apps",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -105,6 +105,9 @@
|
|
|
105
105
|
"engines": {
|
|
106
106
|
"node": ">=18.0.0"
|
|
107
107
|
},
|
|
108
|
+
"optionalDependencies": {
|
|
109
|
+
"@huggingface/transformers": "^3.4.2"
|
|
110
|
+
},
|
|
108
111
|
"peerDependenciesMeta": {
|
|
109
112
|
"better-sqlite3": {
|
|
110
113
|
"optional": true
|
|
@@ -119,6 +122,7 @@
|
|
|
119
122
|
"@babel/parser": "7.26.3",
|
|
120
123
|
"@babel/traverse": "7.26.3",
|
|
121
124
|
"@babel/types": "7.26.3",
|
|
125
|
+
"@huggingface/transformers": "3.4.2",
|
|
122
126
|
"@mdx-js/mdx": "3.0.0",
|
|
123
127
|
"@opentelemetry/api": "1",
|
|
124
128
|
"@opentelemetry/context-async-hooks": "1",
|
|
@@ -1,168 +1,303 @@
|
|
|
1
1
|
export const ADJECTIVES = [
|
|
2
|
-
"
|
|
3
|
-
"azure",
|
|
4
|
-
"coral",
|
|
5
|
-
"crimson",
|
|
6
|
-
"cyan",
|
|
7
|
-
"golden",
|
|
8
|
-
"indigo",
|
|
9
|
-
"ivory",
|
|
10
|
-
"jade",
|
|
11
|
-
"magenta",
|
|
12
|
-
"maroon",
|
|
13
|
-
"olive",
|
|
14
|
-
"onyx",
|
|
15
|
-
"opal",
|
|
16
|
-
"pearl",
|
|
17
|
-
"ruby",
|
|
18
|
-
"scarlet",
|
|
19
|
-
"silver",
|
|
20
|
-
"teal",
|
|
21
|
-
"topaz",
|
|
22
|
-
"turquoise",
|
|
23
|
-
"violet",
|
|
2
|
+
"agile",
|
|
24
3
|
"alpine",
|
|
4
|
+
"amber",
|
|
5
|
+
"ancient",
|
|
6
|
+
"aqua",
|
|
25
7
|
"arctic",
|
|
8
|
+
"arid",
|
|
9
|
+
"astral",
|
|
26
10
|
"autumn",
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"floral",
|
|
31
|
-
"forest",
|
|
32
|
-
"frozen",
|
|
33
|
-
"lunar",
|
|
34
|
-
"misty",
|
|
35
|
-
"mossy",
|
|
36
|
-
"ocean",
|
|
37
|
-
"polar",
|
|
38
|
-
"rainy",
|
|
39
|
-
"snowy",
|
|
40
|
-
"solar",
|
|
41
|
-
"spring",
|
|
42
|
-
"stormy",
|
|
43
|
-
"sunny",
|
|
44
|
-
"tidal",
|
|
45
|
-
"tropic",
|
|
46
|
-
"windy",
|
|
47
|
-
"agile",
|
|
11
|
+
"azure",
|
|
12
|
+
"balmy",
|
|
13
|
+
"blazing",
|
|
48
14
|
"bold",
|
|
49
15
|
"brave",
|
|
16
|
+
"breezy",
|
|
50
17
|
"bright",
|
|
18
|
+
"brisk",
|
|
19
|
+
"bronze",
|
|
51
20
|
"calm",
|
|
21
|
+
"cedar",
|
|
52
22
|
"clever",
|
|
23
|
+
"coastal",
|
|
24
|
+
"cobalt",
|
|
25
|
+
"copper",
|
|
26
|
+
"coral",
|
|
53
27
|
"cosmic",
|
|
28
|
+
"crimson",
|
|
29
|
+
"crisp",
|
|
30
|
+
"crystal",
|
|
31
|
+
"cyan",
|
|
54
32
|
"daring",
|
|
33
|
+
"deep",
|
|
34
|
+
"dewy",
|
|
35
|
+
"dreamy",
|
|
36
|
+
"dusky",
|
|
37
|
+
"dusty",
|
|
55
38
|
"eager",
|
|
39
|
+
"earthy",
|
|
40
|
+
"ebony",
|
|
41
|
+
"emerald",
|
|
56
42
|
"epic",
|
|
43
|
+
"faint",
|
|
44
|
+
"feral",
|
|
57
45
|
"fierce",
|
|
46
|
+
"fleet",
|
|
47
|
+
"floral",
|
|
48
|
+
"fluid",
|
|
49
|
+
"forest",
|
|
50
|
+
"fresh",
|
|
51
|
+
"frozen",
|
|
52
|
+
"frosty",
|
|
53
|
+
"garnet",
|
|
58
54
|
"gentle",
|
|
55
|
+
"glacial",
|
|
56
|
+
"gleaming",
|
|
57
|
+
"glowing",
|
|
58
|
+
"golden",
|
|
59
|
+
"graceful",
|
|
59
60
|
"grand",
|
|
61
|
+
"hazy",
|
|
62
|
+
"hollow",
|
|
63
|
+
"hushed",
|
|
64
|
+
"icy",
|
|
65
|
+
"indigo",
|
|
66
|
+
"ivory",
|
|
67
|
+
"jade",
|
|
60
68
|
"keen",
|
|
61
69
|
"kind",
|
|
70
|
+
"lasting",
|
|
71
|
+
"lavender",
|
|
72
|
+
"leafy",
|
|
73
|
+
"light",
|
|
74
|
+
"lilac",
|
|
62
75
|
"lively",
|
|
76
|
+
"lone",
|
|
77
|
+
"lucid",
|
|
78
|
+
"lunar",
|
|
79
|
+
"magic",
|
|
80
|
+
"magenta",
|
|
81
|
+
"marine",
|
|
82
|
+
"maroon",
|
|
83
|
+
"mellow",
|
|
84
|
+
"mighty",
|
|
85
|
+
"misty",
|
|
86
|
+
"mossy",
|
|
63
87
|
"mystic",
|
|
64
88
|
"nimble",
|
|
65
89
|
"noble",
|
|
90
|
+
"obsidian",
|
|
91
|
+
"olive",
|
|
92
|
+
"onyx",
|
|
93
|
+
"opal",
|
|
94
|
+
"pale",
|
|
95
|
+
"pearl",
|
|
96
|
+
"placid",
|
|
97
|
+
"platinum",
|
|
98
|
+
"polar",
|
|
99
|
+
"prime",
|
|
66
100
|
"proud",
|
|
101
|
+
"pure",
|
|
67
102
|
"quiet",
|
|
103
|
+
"rainy",
|
|
68
104
|
"rapid",
|
|
105
|
+
"rare",
|
|
106
|
+
"regal",
|
|
107
|
+
"rosy",
|
|
108
|
+
"ruby",
|
|
109
|
+
"rugged",
|
|
110
|
+
"russet",
|
|
111
|
+
"rustic",
|
|
112
|
+
"saffron",
|
|
113
|
+
"sage",
|
|
114
|
+
"sandy",
|
|
115
|
+
"sapphire",
|
|
116
|
+
"scarlet",
|
|
69
117
|
"serene",
|
|
118
|
+
"shady",
|
|
119
|
+
"sharp",
|
|
70
120
|
"silent",
|
|
121
|
+
"silver",
|
|
122
|
+
"slate",
|
|
123
|
+
"sleek",
|
|
124
|
+
"smooth",
|
|
125
|
+
"snowy",
|
|
126
|
+
"soft",
|
|
127
|
+
"solar",
|
|
128
|
+
"somber",
|
|
129
|
+
"stark",
|
|
130
|
+
"starry",
|
|
71
131
|
"steady",
|
|
132
|
+
"stormy",
|
|
133
|
+
"strong",
|
|
134
|
+
"subtle",
|
|
135
|
+
"sunny",
|
|
136
|
+
"sunlit",
|
|
72
137
|
"swift",
|
|
138
|
+
"tawny",
|
|
139
|
+
"teal",
|
|
140
|
+
"tidal",
|
|
141
|
+
"topaz",
|
|
142
|
+
"tropic",
|
|
143
|
+
"turquoise",
|
|
144
|
+
"vast",
|
|
145
|
+
"velvet",
|
|
146
|
+
"verdant",
|
|
147
|
+
"violet",
|
|
73
148
|
"vivid",
|
|
149
|
+
"warm",
|
|
74
150
|
"wild",
|
|
151
|
+
"windy",
|
|
152
|
+
"wintry",
|
|
75
153
|
"wise",
|
|
76
154
|
"witty",
|
|
155
|
+
"woody",
|
|
77
156
|
"zen",
|
|
78
157
|
];
|
|
79
158
|
|
|
80
159
|
export const NOUNS = [
|
|
160
|
+
"arc",
|
|
161
|
+
"arch",
|
|
162
|
+
"aurora",
|
|
163
|
+
"basin",
|
|
81
164
|
"bay",
|
|
165
|
+
"beam",
|
|
166
|
+
"bend",
|
|
167
|
+
"blaze",
|
|
168
|
+
"bluff",
|
|
169
|
+
"bog",
|
|
170
|
+
"bolt",
|
|
171
|
+
"breeze",
|
|
82
172
|
"brook",
|
|
83
173
|
"canal",
|
|
84
|
-
"cascade",
|
|
85
|
-
"coast",
|
|
86
|
-
"creek",
|
|
87
|
-
"delta",
|
|
88
|
-
"falls",
|
|
89
|
-
"fjord",
|
|
90
|
-
"gulf",
|
|
91
|
-
"harbor",
|
|
92
|
-
"lagoon",
|
|
93
|
-
"lake",
|
|
94
|
-
"marsh",
|
|
95
|
-
"ocean",
|
|
96
|
-
"pond",
|
|
97
|
-
"rapids",
|
|
98
|
-
"reef",
|
|
99
|
-
"river",
|
|
100
|
-
"shore",
|
|
101
|
-
"spring",
|
|
102
|
-
"strait",
|
|
103
|
-
"stream",
|
|
104
|
-
"tide",
|
|
105
|
-
"wave",
|
|
106
|
-
"bluff",
|
|
107
174
|
"canyon",
|
|
175
|
+
"cape",
|
|
176
|
+
"cascade",
|
|
108
177
|
"cave",
|
|
178
|
+
"cavern",
|
|
179
|
+
"channel",
|
|
109
180
|
"cliff",
|
|
110
|
-
"crater",
|
|
111
|
-
"desert",
|
|
112
|
-
"dune",
|
|
113
|
-
"field",
|
|
114
|
-
"glade",
|
|
115
|
-
"gorge",
|
|
116
|
-
"grove",
|
|
117
|
-
"hill",
|
|
118
|
-
"isle",
|
|
119
|
-
"mesa",
|
|
120
|
-
"oasis",
|
|
121
|
-
"pass",
|
|
122
|
-
"peak",
|
|
123
|
-
"plain",
|
|
124
|
-
"plateau",
|
|
125
|
-
"ridge",
|
|
126
|
-
"rock",
|
|
127
|
-
"slope",
|
|
128
|
-
"stone",
|
|
129
|
-
"summit",
|
|
130
|
-
"trail",
|
|
131
|
-
"valley",
|
|
132
|
-
"volcano",
|
|
133
|
-
"aurora",
|
|
134
181
|
"cloud",
|
|
182
|
+
"coast",
|
|
135
183
|
"comet",
|
|
184
|
+
"copse",
|
|
185
|
+
"corona",
|
|
136
186
|
"cosmos",
|
|
187
|
+
"cove",
|
|
188
|
+
"crater",
|
|
189
|
+
"creek",
|
|
190
|
+
"crest",
|
|
191
|
+
"dale",
|
|
137
192
|
"dawn",
|
|
193
|
+
"delta",
|
|
194
|
+
"desert",
|
|
195
|
+
"drift",
|
|
196
|
+
"dune",
|
|
138
197
|
"dusk",
|
|
139
198
|
"eclipse",
|
|
199
|
+
"edge",
|
|
140
200
|
"ember",
|
|
201
|
+
"falls",
|
|
202
|
+
"fen",
|
|
203
|
+
"field",
|
|
204
|
+
"fjord",
|
|
141
205
|
"flare",
|
|
206
|
+
"flame",
|
|
207
|
+
"ford",
|
|
142
208
|
"frost",
|
|
143
209
|
"galaxy",
|
|
210
|
+
"gap",
|
|
211
|
+
"glade",
|
|
212
|
+
"glen",
|
|
144
213
|
"glow",
|
|
214
|
+
"gorge",
|
|
215
|
+
"grove",
|
|
216
|
+
"gulf",
|
|
217
|
+
"gust",
|
|
218
|
+
"harbor",
|
|
219
|
+
"haven",
|
|
145
220
|
"haze",
|
|
221
|
+
"heath",
|
|
222
|
+
"hill",
|
|
223
|
+
"hollow",
|
|
146
224
|
"horizon",
|
|
225
|
+
"inlet",
|
|
226
|
+
"isle",
|
|
227
|
+
"knoll",
|
|
228
|
+
"lagoon",
|
|
229
|
+
"lake",
|
|
230
|
+
"ledge",
|
|
231
|
+
"loch",
|
|
232
|
+
"marsh",
|
|
233
|
+
"meadow",
|
|
234
|
+
"mesa",
|
|
147
235
|
"meteor",
|
|
148
236
|
"mist",
|
|
149
237
|
"moon",
|
|
238
|
+
"moor",
|
|
239
|
+
"mount",
|
|
150
240
|
"nebula",
|
|
241
|
+
"north",
|
|
151
242
|
"nova",
|
|
243
|
+
"oasis",
|
|
244
|
+
"ocean",
|
|
152
245
|
"orbit",
|
|
246
|
+
"pass",
|
|
247
|
+
"peak",
|
|
248
|
+
"pine",
|
|
249
|
+
"plain",
|
|
250
|
+
"plateau",
|
|
251
|
+
"plume",
|
|
252
|
+
"pond",
|
|
253
|
+
"pool",
|
|
153
254
|
"prism",
|
|
154
255
|
"pulse",
|
|
155
256
|
"quasar",
|
|
257
|
+
"rain",
|
|
258
|
+
"range",
|
|
259
|
+
"rapids",
|
|
260
|
+
"ravine",
|
|
156
261
|
"ray",
|
|
262
|
+
"reef",
|
|
263
|
+
"ridge",
|
|
264
|
+
"rift",
|
|
265
|
+
"ripple",
|
|
266
|
+
"river",
|
|
267
|
+
"rock",
|
|
268
|
+
"sand",
|
|
269
|
+
"shade",
|
|
157
270
|
"shadow",
|
|
271
|
+
"shoal",
|
|
272
|
+
"shore",
|
|
158
273
|
"sky",
|
|
274
|
+
"slope",
|
|
275
|
+
"snow",
|
|
159
276
|
"spark",
|
|
277
|
+
"spring",
|
|
160
278
|
"star",
|
|
279
|
+
"stone",
|
|
161
280
|
"storm",
|
|
281
|
+
"strait",
|
|
282
|
+
"stream",
|
|
283
|
+
"summit",
|
|
162
284
|
"sun",
|
|
285
|
+
"surf",
|
|
163
286
|
"thunder",
|
|
287
|
+
"tide",
|
|
288
|
+
"torch",
|
|
289
|
+
"trail",
|
|
290
|
+
"tundra",
|
|
164
291
|
"twilight",
|
|
292
|
+
"vale",
|
|
293
|
+
"valley",
|
|
165
294
|
"vapor",
|
|
295
|
+
"volcano",
|
|
296
|
+
"vortex",
|
|
297
|
+
"wake",
|
|
298
|
+
"wave",
|
|
299
|
+
"wisp",
|
|
166
300
|
"wind",
|
|
167
301
|
"zenith",
|
|
302
|
+
"zephyr",
|
|
168
303
|
];
|
|
@@ -12,11 +12,11 @@ import { readToken } from "../../auth/token-store.js";
|
|
|
12
12
|
import { fetchRemoteProjects } from "../../sync/index.js";
|
|
13
13
|
import {
|
|
14
14
|
copyDirectory,
|
|
15
|
-
createRemoteProject,
|
|
16
15
|
generateRandomSlug,
|
|
17
16
|
getLocalProjectsFromState,
|
|
18
17
|
normalizeSlug,
|
|
19
18
|
} from "../utils.js";
|
|
19
|
+
import { reserveProjectSlug } from "../../shared/reserve-slug.js";
|
|
20
20
|
import { initCommand } from "../../commands/init/init-command.js";
|
|
21
21
|
import type { InitTemplate } from "../../commands/init/types.js";
|
|
22
22
|
|
|
@@ -45,7 +45,7 @@ export async function createProject(
|
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
const normalizedSlug = normalizeSlug(projectName);
|
|
48
|
-
const { slug } = await
|
|
48
|
+
const { slug } = await reserveProjectSlug(normalizedSlug, token);
|
|
49
49
|
const projectPath = `${cwd()}/projects/${slug}`;
|
|
50
50
|
|
|
51
51
|
await initCommand({
|
|
@@ -95,7 +95,7 @@ export async function createProjectFromExample(
|
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
const normalizedSlug = normalizeSlug(projectName);
|
|
98
|
-
const { slug } = await
|
|
98
|
+
const { slug } = await reserveProjectSlug(normalizedSlug, token);
|
|
99
99
|
const projectPath = `${cwd()}/projects/${slug}`;
|
|
100
100
|
|
|
101
101
|
await copyDirectory(example.path, projectPath);
|
package/src/cli/app/shell.ts
CHANGED
|
@@ -158,7 +158,7 @@ export function createApp(config: AppConfig): App {
|
|
|
158
158
|
case "dashboard":
|
|
159
159
|
content = state.projects.items.length > 0 || state.examples.items.length > 0
|
|
160
160
|
? renderDashboard(state)
|
|
161
|
-
: renderEmptyState();
|
|
161
|
+
: renderEmptyState(state);
|
|
162
162
|
break;
|
|
163
163
|
case "new-project":
|
|
164
164
|
content = renderNewProjectView(state);
|