Merge branch 'main' into copyMyFix
Browse files- .github/workflows/commit.yaml +9 -3
- .github/workflows/update-stable.yml +7 -24
- README.md +3 -0
- app/components/chat/AssistantMessage.tsx +18 -1
- app/components/chat/BaseChat.tsx +3 -5
- app/components/chat/Chat.client.tsx +12 -2
- app/components/chat/Messages.client.tsx +9 -5
- app/components/chat/UserMessage.tsx +15 -21
- app/components/settings/chat-history/ChatHistoryTab.tsx +5 -1
- app/components/settings/debug/DebugTab.tsx +137 -17
- app/components/settings/features/FeaturesTab.tsx +34 -3
- app/components/settings/providers/ProvidersTab.tsx +2 -1
- app/components/ui/IconButton.tsx +41 -34
- app/components/ui/Tooltip.tsx +62 -56
- app/lib/.server/llm/stream-text.ts +21 -4
- app/lib/common/prompt-library.ts +49 -0
- app/lib/common/prompts/optimized.ts +199 -0
- app/lib/{.server/llm → common/prompts}/prompts.ts +0 -0
- app/lib/hooks/useSettings.tsx +42 -13
- app/lib/stores/settings.ts +3 -1
- app/routes/api.chat.ts +43 -13
- app/routes/api.enhancer.ts +35 -29
- app/utils/constants.ts +1 -1
- package.json +1 -1
- pnpm-lock.yaml +40 -305
- public/apple-touch-icon-precomposed.png +0 -0
- public/apple-touch-icon.png +0 -0
.github/workflows/commit.yaml
CHANGED
@@ -17,12 +17,18 @@ jobs:
|
|
17 |
- name: Checkout the code
|
18 |
uses: actions/checkout@v3
|
19 |
|
|
|
|
|
|
|
|
|
20 |
- name: Get the latest commit hash
|
21 |
-
run:
|
22 |
-
|
|
|
|
|
23 |
- name: Update commit file
|
24 |
run: |
|
25 |
-
echo "{ \"commit\": \"$COMMIT_HASH\" }" > app/commit.json
|
26 |
|
27 |
- name: Commit and push the update
|
28 |
run: |
|
|
|
17 |
- name: Checkout the code
|
18 |
uses: actions/checkout@v3
|
19 |
|
20 |
+
- name: Setup Node.js
|
21 |
+
uses: actions/setup-node@v4
|
22 |
+
with:
|
23 |
+
node-version: '20'
|
24 |
- name: Get the latest commit hash
|
25 |
+
run: |
|
26 |
+
echo "COMMIT_HASH=$(git rev-parse HEAD)" >> $GITHUB_ENV
|
27 |
+
echo "CURRENT_VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_ENV
|
28 |
+
|
29 |
- name: Update commit file
|
30 |
run: |
|
31 |
+
echo "{ \"commit\": \"$COMMIT_HASH\" , \"version\": \"$CURRENT_VERSION\" }" > app/commit.json
|
32 |
|
33 |
- name: Commit and push the update
|
34 |
run: |
|
.github/workflows/update-stable.yml
CHANGED
@@ -9,30 +9,7 @@ permissions:
|
|
9 |
contents: write
|
10 |
|
11 |
jobs:
|
12 |
-
update-commit:
|
13 |
-
if: contains(github.event.head_commit.message, '#release')
|
14 |
-
runs-on: ubuntu-latest
|
15 |
-
|
16 |
-
steps:
|
17 |
-
- name: Checkout the code
|
18 |
-
uses: actions/checkout@v3
|
19 |
-
|
20 |
-
- name: Get the latest commit hash
|
21 |
-
run: echo "COMMIT_HASH=$(git rev-parse HEAD)" >> $GITHUB_ENV
|
22 |
-
|
23 |
-
- name: Update commit file
|
24 |
-
run: |
|
25 |
-
echo "{ \"commit\": \"$COMMIT_HASH\" }" > app/commit.json
|
26 |
-
|
27 |
-
- name: Commit and push the update
|
28 |
-
run: |
|
29 |
-
git config --global user.name "github-actions[bot]"
|
30 |
-
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
31 |
-
git add app/commit.json
|
32 |
-
git commit -m "chore: update commit hash to $COMMIT_HASH"
|
33 |
-
git push
|
34 |
prepare-release:
|
35 |
-
needs: update-commit
|
36 |
if: contains(github.event.head_commit.message, '#release')
|
37 |
runs-on: ubuntu-latest
|
38 |
|
@@ -181,10 +158,16 @@ jobs:
|
|
181 |
echo "$CHANGELOG_CONTENT" >> $GITHUB_OUTPUT
|
182 |
echo "EOF" >> $GITHUB_OUTPUT
|
183 |
|
|
|
|
|
|
|
|
|
|
|
184 |
- name: Commit and Tag Release
|
185 |
run: |
|
186 |
git pull
|
187 |
-
|
|
|
188 |
git commit -m "chore: release version ${{ steps.bump_version.outputs.new_version }}"
|
189 |
git tag "v${{ steps.bump_version.outputs.new_version }}"
|
190 |
git push
|
|
|
9 |
contents: write
|
10 |
|
11 |
jobs:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
prepare-release:
|
|
|
13 |
if: contains(github.event.head_commit.message, '#release')
|
14 |
runs-on: ubuntu-latest
|
15 |
|
|
|
158 |
echo "$CHANGELOG_CONTENT" >> $GITHUB_OUTPUT
|
159 |
echo "EOF" >> $GITHUB_OUTPUT
|
160 |
|
161 |
+
- name: Get the latest commit hash and version tag
|
162 |
+
run: |
|
163 |
+
echo "COMMIT_HASH=$(git rev-parse HEAD)" >> $GITHUB_ENV
|
164 |
+
echo "CURRENT_VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_ENV
|
165 |
+
|
166 |
- name: Commit and Tag Release
|
167 |
run: |
|
168 |
git pull
|
169 |
+
echo "{ \"commit\": \"$COMMIT_HASH\" , \"version\": \"$CURRENT_VERSION\" }" > app/commit.json
|
170 |
+
git add package.json pnpm-lock.yaml changelog.md app/commit.json
|
171 |
git commit -m "chore: release version ${{ steps.bump_version.outputs.new_version }}"
|
172 |
git tag "v${{ steps.bump_version.outputs.new_version }}"
|
173 |
git push
|
README.md
CHANGED
@@ -43,6 +43,9 @@ https://thinktank.ottomator.ai
|
|
43 |
- ✅ Mobile friendly (@qwikode)
|
44 |
- ✅ Better prompt enhancing (@SujalXplores)
|
45 |
- ✅ Attach images to prompts (@atrokhym)
|
|
|
|
|
|
|
46 |
- ✅ Detect package.json and commands to auto install & run preview for folder and git import (@wonderwhy-er)
|
47 |
- ✅ Selection tool to target changes visually (@emcconnell)
|
48 |
- ⬜ **HIGH PRIORITY** - Prevent bolt from rewriting files as often (file locking and diffs)
|
|
|
43 |
- ✅ Mobile friendly (@qwikode)
|
44 |
- ✅ Better prompt enhancing (@SujalXplores)
|
45 |
- ✅ Attach images to prompts (@atrokhym)
|
46 |
+
- ✅ Added Git Clone button (@thecodacus)
|
47 |
+
- ✅ Git Import from url (@thecodacus)
|
48 |
+
- ✅ PromptLibrary to have different variations of prompts for different use cases (@thecodacus)
|
49 |
- ✅ Detect package.json and commands to auto install & run preview for folder and git import (@wonderwhy-er)
|
50 |
- ✅ Selection tool to target changes visually (@emcconnell)
|
51 |
- ⬜ **HIGH PRIORITY** - Prevent bolt from rewriting files as often (file locking and diffs)
|
app/components/chat/AssistantMessage.tsx
CHANGED
@@ -1,13 +1,30 @@
|
|
1 |
import { memo } from 'react';
|
2 |
import { Markdown } from './Markdown';
|
|
|
3 |
|
4 |
interface AssistantMessageProps {
|
5 |
content: string;
|
|
|
6 |
}
|
7 |
|
8 |
-
export const AssistantMessage = memo(({ content }: AssistantMessageProps) => {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
return (
|
10 |
<div className="overflow-hidden w-full">
|
|
|
|
|
|
|
|
|
|
|
11 |
<Markdown html>{content}</Markdown>
|
12 |
</div>
|
13 |
);
|
|
|
1 |
import { memo } from 'react';
|
2 |
import { Markdown } from './Markdown';
|
3 |
+
import type { JSONValue } from 'ai';
|
4 |
|
5 |
interface AssistantMessageProps {
|
6 |
content: string;
|
7 |
+
annotations?: JSONValue[];
|
8 |
}
|
9 |
|
10 |
+
export const AssistantMessage = memo(({ content, annotations }: AssistantMessageProps) => {
|
11 |
+
const filteredAnnotations = (annotations?.filter(
|
12 |
+
(annotation: JSONValue) => annotation && typeof annotation === 'object' && Object.keys(annotation).includes('type'),
|
13 |
+
) || []) as { type: string; value: any }[];
|
14 |
+
|
15 |
+
const usage: {
|
16 |
+
completionTokens: number;
|
17 |
+
promptTokens: number;
|
18 |
+
totalTokens: number;
|
19 |
+
} = filteredAnnotations.find((annotation) => annotation.type === 'usage')?.value;
|
20 |
+
|
21 |
return (
|
22 |
<div className="overflow-hidden w-full">
|
23 |
+
{usage && (
|
24 |
+
<div className="text-sm text-bolt-elements-textSecondary mb-2">
|
25 |
+
Tokens: {usage.totalTokens} (prompt: {usage.promptTokens}, completion: {usage.completionTokens})
|
26 |
+
</div>
|
27 |
+
)}
|
28 |
<Markdown html>{content}</Markdown>
|
29 |
</div>
|
30 |
);
|
app/components/chat/BaseChat.tsx
CHANGED
@@ -77,7 +77,8 @@ export const BaseChat = React.forwardRef<HTMLDivElement, BaseChatProps>(
|
|
77 |
input = '',
|
78 |
enhancingPrompt,
|
79 |
handleInputChange,
|
80 |
-
|
|
|
81 |
enhancePrompt,
|
82 |
sendMessage,
|
83 |
handleStop,
|
@@ -490,10 +491,7 @@ export const BaseChat = React.forwardRef<HTMLDivElement, BaseChatProps>(
|
|
490 |
<IconButton
|
491 |
title="Enhance prompt"
|
492 |
disabled={input.length === 0 || enhancingPrompt}
|
493 |
-
className={classNames(
|
494 |
-
'transition-all',
|
495 |
-
enhancingPrompt ? 'opacity-100' : '',
|
496 |
-
)}
|
497 |
onClick={() => {
|
498 |
enhancePrompt?.();
|
499 |
toast.success('Prompt enhanced!');
|
|
|
77 |
input = '',
|
78 |
enhancingPrompt,
|
79 |
handleInputChange,
|
80 |
+
|
81 |
+
// promptEnhanced,
|
82 |
enhancePrompt,
|
83 |
sendMessage,
|
84 |
handleStop,
|
|
|
491 |
<IconButton
|
492 |
title="Enhance prompt"
|
493 |
disabled={input.length === 0 || enhancingPrompt}
|
494 |
+
className={classNames('transition-all', enhancingPrompt ? 'opacity-100' : '')}
|
|
|
|
|
|
|
495 |
onClick={() => {
|
496 |
enhancePrompt?.();
|
497 |
toast.success('Prompt enhanced!');
|
app/components/chat/Chat.client.tsx
CHANGED
@@ -93,7 +93,7 @@ export const ChatImpl = memo(
|
|
93 |
const [uploadedFiles, setUploadedFiles] = useState<File[]>([]); // Move here
|
94 |
const [imageDataList, setImageDataList] = useState<string[]>([]); // Move here
|
95 |
const files = useStore(workbenchStore.files);
|
96 |
-
const { activeProviders } = useSettings();
|
97 |
|
98 |
const [model, setModel] = useState(() => {
|
99 |
const savedModel = Cookies.get('selectedModel');
|
@@ -115,14 +115,24 @@ export const ChatImpl = memo(
|
|
115 |
body: {
|
116 |
apiKeys,
|
117 |
files,
|
|
|
118 |
},
|
|
|
119 |
onError: (error) => {
|
120 |
logger.error('Request failed\n\n', error);
|
121 |
toast.error(
|
122 |
'There was an error processing your request: ' + (error.message ? error.message : 'No details were returned'),
|
123 |
);
|
124 |
},
|
125 |
-
onFinish: () => {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
126 |
logger.debug('Finished streaming');
|
127 |
},
|
128 |
initialMessages,
|
|
|
93 |
const [uploadedFiles, setUploadedFiles] = useState<File[]>([]); // Move here
|
94 |
const [imageDataList, setImageDataList] = useState<string[]>([]); // Move here
|
95 |
const files = useStore(workbenchStore.files);
|
96 |
+
const { activeProviders, promptId } = useSettings();
|
97 |
|
98 |
const [model, setModel] = useState(() => {
|
99 |
const savedModel = Cookies.get('selectedModel');
|
|
|
115 |
body: {
|
116 |
apiKeys,
|
117 |
files,
|
118 |
+
promptId,
|
119 |
},
|
120 |
+
sendExtraMessageFields: true,
|
121 |
onError: (error) => {
|
122 |
logger.error('Request failed\n\n', error);
|
123 |
toast.error(
|
124 |
'There was an error processing your request: ' + (error.message ? error.message : 'No details were returned'),
|
125 |
);
|
126 |
},
|
127 |
+
onFinish: (message, response) => {
|
128 |
+
const usage = response.usage;
|
129 |
+
|
130 |
+
if (usage) {
|
131 |
+
console.log('Token usage:', usage);
|
132 |
+
|
133 |
+
// You can now use the usage data as needed
|
134 |
+
}
|
135 |
+
|
136 |
logger.debug('Finished streaming');
|
137 |
},
|
138 |
initialMessages,
|
app/components/chat/Messages.client.tsx
CHANGED
@@ -65,12 +65,16 @@ export const Messages = React.forwardRef<HTMLDivElement, MessagesProps>((props:
|
|
65 |
</div>
|
66 |
)}
|
67 |
<div className="grid grid-col-1 w-full">
|
68 |
-
{isUserMessage ?
|
|
|
|
|
|
|
|
|
69 |
</div>
|
70 |
{!isUserMessage && (
|
71 |
<div className="flex gap-2 flex-col lg:flex-row">
|
72 |
-
|
73 |
-
|
74 |
<button
|
75 |
onClick={() => handleRewind(messageId)}
|
76 |
key="i-ph:arrow-u-up-left"
|
@@ -79,8 +83,8 @@ export const Messages = React.forwardRef<HTMLDivElement, MessagesProps>((props:
|
|
79 |
'text-xl text-bolt-elements-textSecondary hover:text-bolt-elements-textPrimary transition-colors',
|
80 |
)}
|
81 |
/>
|
82 |
-
|
83 |
-
|
84 |
|
85 |
<WithTooltip tooltip="Fork chat from this message">
|
86 |
<button
|
|
|
65 |
</div>
|
66 |
)}
|
67 |
<div className="grid grid-col-1 w-full">
|
68 |
+
{isUserMessage ? (
|
69 |
+
<UserMessage content={content} />
|
70 |
+
) : (
|
71 |
+
<AssistantMessage content={content} annotations={message.annotations} />
|
72 |
+
)}
|
73 |
</div>
|
74 |
{!isUserMessage && (
|
75 |
<div className="flex gap-2 flex-col lg:flex-row">
|
76 |
+
{messageId && (
|
77 |
+
<WithTooltip tooltip="Revert to this message">
|
78 |
<button
|
79 |
onClick={() => handleRewind(messageId)}
|
80 |
key="i-ph:arrow-u-up-left"
|
|
|
83 |
'text-xl text-bolt-elements-textSecondary hover:text-bolt-elements-textPrimary transition-colors',
|
84 |
)}
|
85 |
/>
|
86 |
+
</WithTooltip>
|
87 |
+
)}
|
88 |
|
89 |
<WithTooltip tooltip="Fork chat from this message">
|
90 |
<button
|
app/components/chat/UserMessage.tsx
CHANGED
@@ -12,42 +12,36 @@ interface UserMessageProps {
|
|
12 |
export function UserMessage({ content }: UserMessageProps) {
|
13 |
if (Array.isArray(content)) {
|
14 |
const textItem = content.find((item) => item.type === 'text');
|
15 |
-
const textContent =
|
16 |
const images = content.filter((item) => item.type === 'image' && item.image);
|
17 |
|
18 |
return (
|
19 |
<div className="overflow-hidden pt-[4px]">
|
20 |
-
<div className="flex
|
21 |
-
<
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
{
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
className="w-full h-[160px] rounded-lg object-cover border border-bolt-elements-borderColor"
|
32 |
-
/>
|
33 |
-
</div>
|
34 |
-
))}
|
35 |
-
</div>
|
36 |
-
)}
|
37 |
</div>
|
38 |
</div>
|
39 |
);
|
40 |
}
|
41 |
|
42 |
-
const textContent =
|
43 |
|
44 |
return (
|
45 |
<div className="overflow-hidden pt-[4px]">
|
46 |
-
<Markdown
|
47 |
</div>
|
48 |
);
|
49 |
}
|
50 |
|
51 |
-
function
|
52 |
return content.replace(MODEL_REGEX, '').replace(PROVIDER_REGEX, '');
|
53 |
}
|
|
|
12 |
export function UserMessage({ content }: UserMessageProps) {
|
13 |
if (Array.isArray(content)) {
|
14 |
const textItem = content.find((item) => item.type === 'text');
|
15 |
+
const textContent = stripMetadata(textItem?.text || '');
|
16 |
const images = content.filter((item) => item.type === 'image' && item.image);
|
17 |
|
18 |
return (
|
19 |
<div className="overflow-hidden pt-[4px]">
|
20 |
+
<div className="flex flex-col gap-4">
|
21 |
+
{textContent && <Markdown html>{textContent}</Markdown>}
|
22 |
+
{images.map((item, index) => (
|
23 |
+
<img
|
24 |
+
key={index}
|
25 |
+
src={item.image}
|
26 |
+
alt={`Image ${index + 1}`}
|
27 |
+
className="max-w-full h-auto rounded-lg"
|
28 |
+
style={{ maxHeight: '512px', objectFit: 'contain' }}
|
29 |
+
/>
|
30 |
+
))}
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
</div>
|
32 |
</div>
|
33 |
);
|
34 |
}
|
35 |
|
36 |
+
const textContent = stripMetadata(content);
|
37 |
|
38 |
return (
|
39 |
<div className="overflow-hidden pt-[4px]">
|
40 |
+
<Markdown html>{textContent}</Markdown>
|
41 |
</div>
|
42 |
);
|
43 |
}
|
44 |
|
45 |
+
function stripMetadata(content: string) {
|
46 |
return content.replace(MODEL_REGEX, '').replace(PROVIDER_REGEX, '');
|
47 |
}
|
app/components/settings/chat-history/ChatHistoryTab.tsx
CHANGED
@@ -22,7 +22,8 @@ export default function ChatHistoryTab() {
|
|
22 |
};
|
23 |
|
24 |
const handleDeleteAllChats = async () => {
|
25 |
-
const confirmDelete = window.confirm(
|
|
|
26 |
if (!confirmDelete) {
|
27 |
return; // Exit if the user cancels
|
28 |
}
|
@@ -31,11 +32,13 @@ export default function ChatHistoryTab() {
|
|
31 |
const error = new Error('Database is not available');
|
32 |
logStore.logError('Failed to delete chats - DB unavailable', error);
|
33 |
toast.error('Database is not available');
|
|
|
34 |
return;
|
35 |
}
|
36 |
|
37 |
try {
|
38 |
setIsDeleting(true);
|
|
|
39 |
const allChats = await getAll(db);
|
40 |
await Promise.all(allChats.map((chat) => deleteById(db!, chat.id)));
|
41 |
logStore.logSystem('All chats deleted successfully', { count: allChats.length });
|
@@ -55,6 +58,7 @@ export default function ChatHistoryTab() {
|
|
55 |
const error = new Error('Database is not available');
|
56 |
logStore.logError('Failed to export chats - DB unavailable', error);
|
57 |
toast.error('Database is not available');
|
|
|
58 |
return;
|
59 |
}
|
60 |
|
|
|
22 |
};
|
23 |
|
24 |
const handleDeleteAllChats = async () => {
|
25 |
+
const confirmDelete = window.confirm('Are you sure you want to delete all chats? This action cannot be undone.');
|
26 |
+
|
27 |
if (!confirmDelete) {
|
28 |
return; // Exit if the user cancels
|
29 |
}
|
|
|
32 |
const error = new Error('Database is not available');
|
33 |
logStore.logError('Failed to delete chats - DB unavailable', error);
|
34 |
toast.error('Database is not available');
|
35 |
+
|
36 |
return;
|
37 |
}
|
38 |
|
39 |
try {
|
40 |
setIsDeleting(true);
|
41 |
+
|
42 |
const allChats = await getAll(db);
|
43 |
await Promise.all(allChats.map((chat) => deleteById(db!, chat.id)));
|
44 |
logStore.logSystem('All chats deleted successfully', { count: allChats.length });
|
|
|
58 |
const error = new Error('Database is not available');
|
59 |
logStore.logError('Failed to export chats - DB unavailable', error);
|
60 |
toast.error('Database is not available');
|
61 |
+
|
62 |
return;
|
63 |
}
|
64 |
|
app/components/settings/debug/DebugTab.tsx
CHANGED
@@ -22,6 +22,12 @@ interface SystemInfo {
|
|
22 |
timezone: string;
|
23 |
memory: string;
|
24 |
cores: number;
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
}
|
26 |
|
27 |
interface IProviderConfig {
|
@@ -34,14 +40,19 @@ interface IProviderConfig {
|
|
34 |
|
35 |
interface CommitData {
|
36 |
commit: string;
|
|
|
37 |
}
|
38 |
|
|
|
|
|
39 |
const LOCAL_PROVIDERS = ['Ollama', 'LMStudio', 'OpenAILike'];
|
40 |
-
const versionHash =
|
|
|
41 |
const GITHUB_URLS = {
|
42 |
original: 'https://api.github.com/repos/stackblitz-labs/bolt.diy/commits/main',
|
43 |
fork: 'https://api.github.com/repos/Stijnus/bolt.new-any-llm/commits/main',
|
44 |
-
commitJson: (branch: string) =>
|
|
|
45 |
};
|
46 |
|
47 |
function getSystemInfo(): SystemInfo {
|
@@ -57,14 +68,100 @@ function getSystemInfo(): SystemInfo {
|
|
57 |
return parseFloat((bytes / Math.pow(k, i)).toFixed(2)) + ' ' + sizes[i];
|
58 |
};
|
59 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
return {
|
61 |
-
os:
|
62 |
-
browser:
|
63 |
screen: `${window.screen.width}x${window.screen.height}`,
|
64 |
language: navigator.language,
|
65 |
timezone: Intl.DateTimeFormat().resolvedOptions().timeZone,
|
66 |
-
memory:
|
67 |
cores: navigator.hardwareConcurrency || 0,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
};
|
69 |
}
|
70 |
|
@@ -206,7 +303,7 @@ const checkProviderStatus = async (url: string | null, providerName: string): Pr
|
|
206 |
};
|
207 |
|
208 |
export default function DebugTab() {
|
209 |
-
const { providers,
|
210 |
const [activeProviders, setActiveProviders] = useState<ProviderStatus[]>([]);
|
211 |
const [updateMessage, setUpdateMessage] = useState<string>('');
|
212 |
const [systemInfo] = useState<SystemInfo>(getSystemInfo());
|
@@ -227,19 +324,20 @@ export default function DebugTab() {
|
|
227 |
provider.name.toLowerCase() === 'ollama'
|
228 |
? 'OLLAMA_API_BASE_URL'
|
229 |
: provider.name.toLowerCase() === 'lmstudio'
|
230 |
-
|
231 |
-
|
232 |
|
233 |
// Access environment variables through import.meta.env
|
234 |
const url = import.meta.env[envVarName] || provider.settings.baseUrl || null; // Ensure baseUrl is used
|
235 |
console.log(`[Debug] Using URL for ${provider.name}:`, url, `(from ${envVarName})`);
|
236 |
|
237 |
const status = await checkProviderStatus(url, provider.name);
|
|
|
238 |
return {
|
239 |
...status,
|
240 |
enabled: provider.settings.enabled ?? false,
|
241 |
};
|
242 |
-
})
|
243 |
);
|
244 |
|
245 |
setActiveProviders(statuses);
|
@@ -265,23 +363,24 @@ export default function DebugTab() {
|
|
265 |
setIsCheckingUpdate(true);
|
266 |
setUpdateMessage('Checking for updates...');
|
267 |
|
268 |
-
const branchToCheck =
|
269 |
console.log(`[Debug] Checking for updates against ${branchToCheck} branch`);
|
270 |
|
271 |
const localCommitResponse = await fetch(GITHUB_URLS.commitJson(branchToCheck));
|
|
|
272 |
if (!localCommitResponse.ok) {
|
273 |
throw new Error('Failed to fetch local commit info');
|
274 |
}
|
275 |
|
276 |
-
const localCommitData = await localCommitResponse.json() as CommitData;
|
277 |
const remoteCommitHash = localCommitData.commit;
|
278 |
const currentCommitHash = versionHash;
|
279 |
|
280 |
if (remoteCommitHash !== currentCommitHash) {
|
281 |
setUpdateMessage(
|
282 |
`Update available from ${branchToCheck} branch!\n` +
|
283 |
-
|
284 |
-
|
285 |
);
|
286 |
} else {
|
287 |
setUpdateMessage(`You are on the latest version from the ${branchToCheck} branch`);
|
@@ -292,7 +391,7 @@ export default function DebugTab() {
|
|
292 |
} finally {
|
293 |
setIsCheckingUpdate(false);
|
294 |
}
|
295 |
-
}, [isCheckingUpdate,
|
296 |
|
297 |
const handleCopyToClipboard = useCallback(() => {
|
298 |
const debugInfo = {
|
@@ -309,7 +408,7 @@ export default function DebugTab() {
|
|
309 |
})),
|
310 |
Version: {
|
311 |
hash: versionHash.slice(0, 7),
|
312 |
-
branch:
|
313 |
},
|
314 |
Timestamp: new Date().toISOString(),
|
315 |
};
|
@@ -317,7 +416,7 @@ export default function DebugTab() {
|
|
317 |
navigator.clipboard.writeText(JSON.stringify(debugInfo, null, 2)).then(() => {
|
318 |
toast.success('Debug information copied to clipboard!');
|
319 |
});
|
320 |
-
}, [activeProviders, systemInfo,
|
321 |
|
322 |
return (
|
323 |
<div className="p-4 space-y-6">
|
@@ -377,10 +476,31 @@ export default function DebugTab() {
|
|
377 |
<p className="text-xs text-bolt-elements-textSecondary">Operating System</p>
|
378 |
<p className="text-sm font-medium text-bolt-elements-textPrimary">{systemInfo.os}</p>
|
379 |
</div>
|
|
|
|
|
|
|
|
|
380 |
<div>
|
381 |
<p className="text-xs text-bolt-elements-textSecondary">Browser</p>
|
382 |
<p className="text-sm font-medium text-bolt-elements-textPrimary">{systemInfo.browser}</p>
|
383 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
384 |
<div>
|
385 |
<p className="text-xs text-bolt-elements-textSecondary">Screen Resolution</p>
|
386 |
<p className="text-sm font-medium text-bolt-elements-textPrimary">{systemInfo.screen}</p>
|
@@ -403,7 +523,7 @@ export default function DebugTab() {
|
|
403 |
<p className="text-sm font-medium text-bolt-elements-textPrimary font-mono">
|
404 |
{versionHash.slice(0, 7)}
|
405 |
<span className="ml-2 text-xs text-bolt-elements-textSecondary">
|
406 |
-
({
|
407 |
</span>
|
408 |
</p>
|
409 |
</div>
|
|
|
22 |
timezone: string;
|
23 |
memory: string;
|
24 |
cores: number;
|
25 |
+
deviceType: string;
|
26 |
+
colorDepth: string;
|
27 |
+
pixelRatio: number;
|
28 |
+
online: boolean;
|
29 |
+
cookiesEnabled: boolean;
|
30 |
+
doNotTrack: boolean;
|
31 |
}
|
32 |
|
33 |
interface IProviderConfig {
|
|
|
40 |
|
41 |
interface CommitData {
|
42 |
commit: string;
|
43 |
+
version?: string;
|
44 |
}
|
45 |
|
46 |
+
const connitJson: CommitData = commit;
|
47 |
+
|
48 |
const LOCAL_PROVIDERS = ['Ollama', 'LMStudio', 'OpenAILike'];
|
49 |
+
const versionHash = connitJson.commit;
|
50 |
+
const versionTag = connitJson.version;
|
51 |
const GITHUB_URLS = {
|
52 |
original: 'https://api.github.com/repos/stackblitz-labs/bolt.diy/commits/main',
|
53 |
fork: 'https://api.github.com/repos/Stijnus/bolt.new-any-llm/commits/main',
|
54 |
+
commitJson: (branch: string) =>
|
55 |
+
`https://raw.githubusercontent.com/stackblitz-labs/bolt.diy/${branch}/app/commit.json`,
|
56 |
};
|
57 |
|
58 |
function getSystemInfo(): SystemInfo {
|
|
|
68 |
return parseFloat((bytes / Math.pow(k, i)).toFixed(2)) + ' ' + sizes[i];
|
69 |
};
|
70 |
|
71 |
+
const getBrowserInfo = (): string => {
|
72 |
+
const ua = navigator.userAgent;
|
73 |
+
let browser = 'Unknown';
|
74 |
+
|
75 |
+
if (ua.includes('Firefox/')) {
|
76 |
+
browser = 'Firefox';
|
77 |
+
} else if (ua.includes('Chrome/')) {
|
78 |
+
if (ua.includes('Edg/')) {
|
79 |
+
browser = 'Edge';
|
80 |
+
} else if (ua.includes('OPR/')) {
|
81 |
+
browser = 'Opera';
|
82 |
+
} else {
|
83 |
+
browser = 'Chrome';
|
84 |
+
}
|
85 |
+
} else if (ua.includes('Safari/')) {
|
86 |
+
if (!ua.includes('Chrome')) {
|
87 |
+
browser = 'Safari';
|
88 |
+
}
|
89 |
+
}
|
90 |
+
|
91 |
+
// Extract version number
|
92 |
+
const match = ua.match(new RegExp(`${browser}\\/([\\d.]+)`));
|
93 |
+
const version = match ? ` ${match[1]}` : '';
|
94 |
+
|
95 |
+
return `${browser}${version}`;
|
96 |
+
};
|
97 |
+
|
98 |
+
const getOperatingSystem = (): string => {
|
99 |
+
const ua = navigator.userAgent;
|
100 |
+
const platform = navigator.platform;
|
101 |
+
|
102 |
+
if (ua.includes('Win')) {
|
103 |
+
return 'Windows';
|
104 |
+
}
|
105 |
+
|
106 |
+
if (ua.includes('Mac')) {
|
107 |
+
if (ua.includes('iPhone') || ua.includes('iPad')) {
|
108 |
+
return 'iOS';
|
109 |
+
}
|
110 |
+
|
111 |
+
return 'macOS';
|
112 |
+
}
|
113 |
+
|
114 |
+
if (ua.includes('Linux')) {
|
115 |
+
return 'Linux';
|
116 |
+
}
|
117 |
+
|
118 |
+
if (ua.includes('Android')) {
|
119 |
+
return 'Android';
|
120 |
+
}
|
121 |
+
|
122 |
+
return platform || 'Unknown';
|
123 |
+
};
|
124 |
+
|
125 |
+
const getDeviceType = (): string => {
|
126 |
+
const ua = navigator.userAgent;
|
127 |
+
|
128 |
+
if (ua.includes('Mobile')) {
|
129 |
+
return 'Mobile';
|
130 |
+
}
|
131 |
+
|
132 |
+
if (ua.includes('Tablet')) {
|
133 |
+
return 'Tablet';
|
134 |
+
}
|
135 |
+
|
136 |
+
return 'Desktop';
|
137 |
+
};
|
138 |
+
|
139 |
+
// Get more detailed memory info if available
|
140 |
+
const getMemoryInfo = (): string => {
|
141 |
+
if ('memory' in performance) {
|
142 |
+
const memory = (performance as any).memory;
|
143 |
+
return `${formatBytes(memory.jsHeapSizeLimit)} (Used: ${formatBytes(memory.usedJSHeapSize)})`;
|
144 |
+
}
|
145 |
+
|
146 |
+
return 'Not available';
|
147 |
+
};
|
148 |
+
|
149 |
return {
|
150 |
+
os: getOperatingSystem(),
|
151 |
+
browser: getBrowserInfo(),
|
152 |
screen: `${window.screen.width}x${window.screen.height}`,
|
153 |
language: navigator.language,
|
154 |
timezone: Intl.DateTimeFormat().resolvedOptions().timeZone,
|
155 |
+
memory: getMemoryInfo(),
|
156 |
cores: navigator.hardwareConcurrency || 0,
|
157 |
+
deviceType: getDeviceType(),
|
158 |
+
|
159 |
+
// Add new fields
|
160 |
+
colorDepth: `${window.screen.colorDepth}-bit`,
|
161 |
+
pixelRatio: window.devicePixelRatio,
|
162 |
+
online: navigator.onLine,
|
163 |
+
cookiesEnabled: navigator.cookieEnabled,
|
164 |
+
doNotTrack: navigator.doNotTrack === '1',
|
165 |
};
|
166 |
}
|
167 |
|
|
|
303 |
};
|
304 |
|
305 |
export default function DebugTab() {
|
306 |
+
const { providers, isLatestBranch } = useSettings();
|
307 |
const [activeProviders, setActiveProviders] = useState<ProviderStatus[]>([]);
|
308 |
const [updateMessage, setUpdateMessage] = useState<string>('');
|
309 |
const [systemInfo] = useState<SystemInfo>(getSystemInfo());
|
|
|
324 |
provider.name.toLowerCase() === 'ollama'
|
325 |
? 'OLLAMA_API_BASE_URL'
|
326 |
: provider.name.toLowerCase() === 'lmstudio'
|
327 |
+
? 'LMSTUDIO_API_BASE_URL'
|
328 |
+
: `REACT_APP_${provider.name.toUpperCase()}_URL`;
|
329 |
|
330 |
// Access environment variables through import.meta.env
|
331 |
const url = import.meta.env[envVarName] || provider.settings.baseUrl || null; // Ensure baseUrl is used
|
332 |
console.log(`[Debug] Using URL for ${provider.name}:`, url, `(from ${envVarName})`);
|
333 |
|
334 |
const status = await checkProviderStatus(url, provider.name);
|
335 |
+
|
336 |
return {
|
337 |
...status,
|
338 |
enabled: provider.settings.enabled ?? false,
|
339 |
};
|
340 |
+
}),
|
341 |
);
|
342 |
|
343 |
setActiveProviders(statuses);
|
|
|
363 |
setIsCheckingUpdate(true);
|
364 |
setUpdateMessage('Checking for updates...');
|
365 |
|
366 |
+
const branchToCheck = isLatestBranch ? 'main' : 'stable';
|
367 |
console.log(`[Debug] Checking for updates against ${branchToCheck} branch`);
|
368 |
|
369 |
const localCommitResponse = await fetch(GITHUB_URLS.commitJson(branchToCheck));
|
370 |
+
|
371 |
if (!localCommitResponse.ok) {
|
372 |
throw new Error('Failed to fetch local commit info');
|
373 |
}
|
374 |
|
375 |
+
const localCommitData = (await localCommitResponse.json()) as CommitData;
|
376 |
const remoteCommitHash = localCommitData.commit;
|
377 |
const currentCommitHash = versionHash;
|
378 |
|
379 |
if (remoteCommitHash !== currentCommitHash) {
|
380 |
setUpdateMessage(
|
381 |
`Update available from ${branchToCheck} branch!\n` +
|
382 |
+
`Current: ${currentCommitHash.slice(0, 7)}\n` +
|
383 |
+
`Latest: ${remoteCommitHash.slice(0, 7)}`,
|
384 |
);
|
385 |
} else {
|
386 |
setUpdateMessage(`You are on the latest version from the ${branchToCheck} branch`);
|
|
|
391 |
} finally {
|
392 |
setIsCheckingUpdate(false);
|
393 |
}
|
394 |
+
}, [isCheckingUpdate, isLatestBranch]);
|
395 |
|
396 |
const handleCopyToClipboard = useCallback(() => {
|
397 |
const debugInfo = {
|
|
|
408 |
})),
|
409 |
Version: {
|
410 |
hash: versionHash.slice(0, 7),
|
411 |
+
branch: isLatestBranch ? 'main' : 'stable',
|
412 |
},
|
413 |
Timestamp: new Date().toISOString(),
|
414 |
};
|
|
|
416 |
navigator.clipboard.writeText(JSON.stringify(debugInfo, null, 2)).then(() => {
|
417 |
toast.success('Debug information copied to clipboard!');
|
418 |
});
|
419 |
+
}, [activeProviders, systemInfo, isLatestBranch]);
|
420 |
|
421 |
return (
|
422 |
<div className="p-4 space-y-6">
|
|
|
476 |
<p className="text-xs text-bolt-elements-textSecondary">Operating System</p>
|
477 |
<p className="text-sm font-medium text-bolt-elements-textPrimary">{systemInfo.os}</p>
|
478 |
</div>
|
479 |
+
<div>
|
480 |
+
<p className="text-xs text-bolt-elements-textSecondary">Device Type</p>
|
481 |
+
<p className="text-sm font-medium text-bolt-elements-textPrimary">{systemInfo.deviceType}</p>
|
482 |
+
</div>
|
483 |
<div>
|
484 |
<p className="text-xs text-bolt-elements-textSecondary">Browser</p>
|
485 |
<p className="text-sm font-medium text-bolt-elements-textPrimary">{systemInfo.browser}</p>
|
486 |
</div>
|
487 |
+
<div>
|
488 |
+
<p className="text-xs text-bolt-elements-textSecondary">Display</p>
|
489 |
+
<p className="text-sm font-medium text-bolt-elements-textPrimary">
|
490 |
+
{systemInfo.screen} ({systemInfo.colorDepth}) @{systemInfo.pixelRatio}x
|
491 |
+
</p>
|
492 |
+
</div>
|
493 |
+
<div>
|
494 |
+
<p className="text-xs text-bolt-elements-textSecondary">Connection</p>
|
495 |
+
<p className="text-sm font-medium flex items-center gap-2">
|
496 |
+
<span
|
497 |
+
className={`inline-block w-2 h-2 rounded-full ${systemInfo.online ? 'bg-green-500' : 'bg-red-500'}`}
|
498 |
+
/>
|
499 |
+
<span className={`${systemInfo.online ? 'text-green-600' : 'text-red-600'}`}>
|
500 |
+
{systemInfo.online ? 'Online' : 'Offline'}
|
501 |
+
</span>
|
502 |
+
</p>
|
503 |
+
</div>
|
504 |
<div>
|
505 |
<p className="text-xs text-bolt-elements-textSecondary">Screen Resolution</p>
|
506 |
<p className="text-sm font-medium text-bolt-elements-textPrimary">{systemInfo.screen}</p>
|
|
|
523 |
<p className="text-sm font-medium text-bolt-elements-textPrimary font-mono">
|
524 |
{versionHash.slice(0, 7)}
|
525 |
<span className="ml-2 text-xs text-bolt-elements-textSecondary">
|
526 |
+
(v{versionTag || '0.0.1'}) - {isLatestBranch ? 'nightly' : 'stable'}
|
527 |
</span>
|
528 |
</p>
|
529 |
</div>
|
app/components/settings/features/FeaturesTab.tsx
CHANGED
@@ -1,9 +1,20 @@
|
|
1 |
import React from 'react';
|
2 |
import { Switch } from '~/components/ui/Switch';
|
|
|
3 |
import { useSettings } from '~/lib/hooks/useSettings';
|
4 |
|
5 |
export default function FeaturesTab() {
|
6 |
-
const {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
|
8 |
const handleToggle = (enabled: boolean) => {
|
9 |
enableDebugMode(enabled);
|
@@ -22,9 +33,11 @@ export default function FeaturesTab() {
|
|
22 |
<div className="flex items-center justify-between">
|
23 |
<div>
|
24 |
<span className="text-bolt-elements-textPrimary">Use Main Branch</span>
|
25 |
-
<p className="text-sm text-bolt-elements-textSecondary">
|
|
|
|
|
26 |
</div>
|
27 |
-
<Switch className="ml-auto" checked={
|
28 |
</div>
|
29 |
</div>
|
30 |
</div>
|
@@ -34,10 +47,28 @@ export default function FeaturesTab() {
|
|
34 |
<p className="text-sm text-bolt-elements-textSecondary mb-4">
|
35 |
Disclaimer: Experimental features may be unstable and are subject to change.
|
36 |
</p>
|
|
|
37 |
<div className="flex items-center justify-between mb-2">
|
38 |
<span className="text-bolt-elements-textPrimary">Experimental Providers</span>
|
39 |
<Switch className="ml-auto" checked={isLocalModel} onCheckedChange={enableLocalModels} />
|
40 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
</div>
|
42 |
</div>
|
43 |
);
|
|
|
1 |
import React from 'react';
|
2 |
import { Switch } from '~/components/ui/Switch';
|
3 |
+
import { PromptLibrary } from '~/lib/common/prompt-library';
|
4 |
import { useSettings } from '~/lib/hooks/useSettings';
|
5 |
|
6 |
export default function FeaturesTab() {
|
7 |
+
const {
|
8 |
+
debug,
|
9 |
+
enableDebugMode,
|
10 |
+
isLocalModel,
|
11 |
+
enableLocalModels,
|
12 |
+
enableEventLogs,
|
13 |
+
isLatestBranch,
|
14 |
+
enableLatestBranch,
|
15 |
+
promptId,
|
16 |
+
setPromptId,
|
17 |
+
} = useSettings();
|
18 |
|
19 |
const handleToggle = (enabled: boolean) => {
|
20 |
enableDebugMode(enabled);
|
|
|
33 |
<div className="flex items-center justify-between">
|
34 |
<div>
|
35 |
<span className="text-bolt-elements-textPrimary">Use Main Branch</span>
|
36 |
+
<p className="text-sm text-bolt-elements-textSecondary">
|
37 |
+
Check for updates against the main branch instead of stable
|
38 |
+
</p>
|
39 |
</div>
|
40 |
+
<Switch className="ml-auto" checked={isLatestBranch} onCheckedChange={enableLatestBranch} />
|
41 |
</div>
|
42 |
</div>
|
43 |
</div>
|
|
|
47 |
<p className="text-sm text-bolt-elements-textSecondary mb-4">
|
48 |
Disclaimer: Experimental features may be unstable and are subject to change.
|
49 |
</p>
|
50 |
+
|
51 |
<div className="flex items-center justify-between mb-2">
|
52 |
<span className="text-bolt-elements-textPrimary">Experimental Providers</span>
|
53 |
<Switch className="ml-auto" checked={isLocalModel} onCheckedChange={enableLocalModels} />
|
54 |
</div>
|
55 |
+
<div className="flex items-start justify-between pt-4 mb-2 gap-2">
|
56 |
+
<div className="flex-1 max-w-[200px]">
|
57 |
+
<span className="text-bolt-elements-textPrimary">Prompt Library</span>
|
58 |
+
<p className="text-sm text-bolt-elements-textSecondary mb-4">
|
59 |
+
Choose a prompt from the library to use as the system prompt.
|
60 |
+
</p>
|
61 |
+
</div>
|
62 |
+
<select
|
63 |
+
value={promptId}
|
64 |
+
onChange={(e) => setPromptId(e.target.value)}
|
65 |
+
className="flex-1 p-2 ml-auto rounded-lg border border-bolt-elements-borderColor bg-bolt-elements-prompt-background text-bolt-elements-textPrimary focus:outline-none focus:ring-2 focus:ring-bolt-elements-focus transition-all text-sm min-w-[100px]"
|
66 |
+
>
|
67 |
+
{PromptLibrary.getList().map((x) => (
|
68 |
+
<option value={x.id}>{x.label}</option>
|
69 |
+
))}
|
70 |
+
</select>
|
71 |
+
</div>
|
72 |
</div>
|
73 |
</div>
|
74 |
);
|
app/components/settings/providers/ProvidersTab.tsx
CHANGED
@@ -56,7 +56,8 @@ export default function ProvidersTab() {
|
|
56 |
<div className="flex items-center gap-2">
|
57 |
<img
|
58 |
src={`/icons/${provider.name}.svg`} // Attempt to load the specific icon
|
59 |
-
onError={(e) => {
|
|
|
60 |
e.currentTarget.src = DefaultIcon;
|
61 |
}}
|
62 |
alt={`${provider.name} icon`}
|
|
|
56 |
<div className="flex items-center gap-2">
|
57 |
<img
|
58 |
src={`/icons/${provider.name}.svg`} // Attempt to load the specific icon
|
59 |
+
onError={(e) => {
|
60 |
+
// Fallback to default icon on error
|
61 |
e.currentTarget.src = DefaultIcon;
|
62 |
}}
|
63 |
alt={`${provider.name} icon`}
|
app/components/ui/IconButton.tsx
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
import { memo } from 'react';
|
2 |
import { classNames } from '~/utils/classNames';
|
3 |
|
4 |
type IconSize = 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
|
@@ -25,41 +25,48 @@ type IconButtonWithChildrenProps = {
|
|
25 |
|
26 |
type IconButtonProps = IconButtonWithoutChildrenProps | IconButtonWithChildrenProps;
|
27 |
|
|
|
28 |
export const IconButton = memo(
|
29 |
-
(
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
}
|
47 |
-
className
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
}
|
|
|
|
|
|
|
|
|
|
|
55 |
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
|
|
63 |
);
|
64 |
|
65 |
function getIconSize(size: IconSize) {
|
|
|
1 |
+
import { memo, forwardRef, type ForwardedRef } from 'react';
|
2 |
import { classNames } from '~/utils/classNames';
|
3 |
|
4 |
type IconSize = 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
|
|
|
25 |
|
26 |
type IconButtonProps = IconButtonWithoutChildrenProps | IconButtonWithChildrenProps;
|
27 |
|
28 |
+
// Componente IconButton com suporte a refs
|
29 |
export const IconButton = memo(
|
30 |
+
forwardRef(
|
31 |
+
(
|
32 |
+
{
|
33 |
+
icon,
|
34 |
+
size = 'xl',
|
35 |
+
className,
|
36 |
+
iconClassName,
|
37 |
+
disabledClassName,
|
38 |
+
disabled = false,
|
39 |
+
title,
|
40 |
+
onClick,
|
41 |
+
children,
|
42 |
+
}: IconButtonProps,
|
43 |
+
ref: ForwardedRef<HTMLButtonElement>,
|
44 |
+
) => {
|
45 |
+
return (
|
46 |
+
<button
|
47 |
+
ref={ref}
|
48 |
+
className={classNames(
|
49 |
+
'flex items-center text-bolt-elements-item-contentDefault bg-transparent enabled:hover:text-bolt-elements-item-contentActive rounded-md p-1 enabled:hover:bg-bolt-elements-item-backgroundActive disabled:cursor-not-allowed',
|
50 |
+
{
|
51 |
+
[classNames('opacity-30', disabledClassName)]: disabled,
|
52 |
+
},
|
53 |
+
className,
|
54 |
+
)}
|
55 |
+
title={title}
|
56 |
+
disabled={disabled}
|
57 |
+
onClick={(event) => {
|
58 |
+
if (disabled) {
|
59 |
+
return;
|
60 |
+
}
|
61 |
|
62 |
+
onClick?.(event);
|
63 |
+
}}
|
64 |
+
>
|
65 |
+
{children ? children : <div className={classNames(icon, getIconSize(size), iconClassName)}></div>}
|
66 |
+
</button>
|
67 |
+
);
|
68 |
+
},
|
69 |
+
),
|
70 |
);
|
71 |
|
72 |
function getIconSize(size: IconSize) {
|
app/components/ui/Tooltip.tsx
CHANGED
@@ -1,8 +1,9 @@
|
|
1 |
import * as Tooltip from '@radix-ui/react-tooltip';
|
|
|
2 |
|
3 |
interface TooltipProps {
|
4 |
tooltip: React.ReactNode;
|
5 |
-
children:
|
6 |
sideOffset?: number;
|
7 |
className?: string;
|
8 |
arrowClassName?: string;
|
@@ -12,62 +13,67 @@ interface TooltipProps {
|
|
12 |
delay?: number;
|
13 |
}
|
14 |
|
15 |
-
const WithTooltip = (
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
max-h-[300px]
|
37 |
-
select-none
|
38 |
-
rounded-md
|
39 |
-
bg-bolt-elements-background-depth-3
|
40 |
-
text-bolt-elements-textPrimary
|
41 |
-
text-sm
|
42 |
-
leading-tight
|
43 |
-
shadow-lg
|
44 |
-
animate-in
|
45 |
-
fade-in-0
|
46 |
-
zoom-in-95
|
47 |
-
data-[state=closed]:animate-out
|
48 |
-
data-[state=closed]:fade-out-0
|
49 |
-
data-[state=closed]:zoom-out-95
|
50 |
-
${className}
|
51 |
-
`}
|
52 |
-
sideOffset={sideOffset}
|
53 |
-
style={{
|
54 |
-
maxWidth,
|
55 |
-
...tooltipStyle,
|
56 |
-
}}
|
57 |
-
>
|
58 |
-
<div className="break-words">{tooltip}</div>
|
59 |
-
<Tooltip.Arrow
|
60 |
className={`
|
61 |
-
|
62 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
`}
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
72 |
|
73 |
export default WithTooltip;
|
|
|
1 |
import * as Tooltip from '@radix-ui/react-tooltip';
|
2 |
+
import { forwardRef, type ForwardedRef, type ReactElement } from 'react';
|
3 |
|
4 |
interface TooltipProps {
|
5 |
tooltip: React.ReactNode;
|
6 |
+
children: ReactElement;
|
7 |
sideOffset?: number;
|
8 |
className?: string;
|
9 |
arrowClassName?: string;
|
|
|
13 |
delay?: number;
|
14 |
}
|
15 |
|
16 |
+
const WithTooltip = forwardRef(
|
17 |
+
(
|
18 |
+
{
|
19 |
+
tooltip,
|
20 |
+
children,
|
21 |
+
sideOffset = 5,
|
22 |
+
className = '',
|
23 |
+
arrowClassName = '',
|
24 |
+
tooltipStyle = {},
|
25 |
+
position = 'top',
|
26 |
+
maxWidth = 250,
|
27 |
+
delay = 0,
|
28 |
+
}: TooltipProps,
|
29 |
+
_ref: ForwardedRef<HTMLElement>,
|
30 |
+
) => {
|
31 |
+
return (
|
32 |
+
<Tooltip.Root delayDuration={delay}>
|
33 |
+
<Tooltip.Trigger asChild>{children}</Tooltip.Trigger>
|
34 |
+
<Tooltip.Portal>
|
35 |
+
<Tooltip.Content
|
36 |
+
side={position}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
className={`
|
38 |
+
z-[2000]
|
39 |
+
px-2.5
|
40 |
+
py-1.5
|
41 |
+
max-h-[300px]
|
42 |
+
select-none
|
43 |
+
rounded-md
|
44 |
+
bg-bolt-elements-background-depth-3
|
45 |
+
text-bolt-elements-textPrimary
|
46 |
+
text-sm
|
47 |
+
leading-tight
|
48 |
+
shadow-lg
|
49 |
+
animate-in
|
50 |
+
fade-in-0
|
51 |
+
zoom-in-95
|
52 |
+
data-[state=closed]:animate-out
|
53 |
+
data-[state=closed]:fade-out-0
|
54 |
+
data-[state=closed]:zoom-out-95
|
55 |
+
${className}
|
56 |
`}
|
57 |
+
sideOffset={sideOffset}
|
58 |
+
style={{
|
59 |
+
maxWidth,
|
60 |
+
...tooltipStyle,
|
61 |
+
}}
|
62 |
+
>
|
63 |
+
<div className="break-words">{tooltip}</div>
|
64 |
+
<Tooltip.Arrow
|
65 |
+
className={`
|
66 |
+
fill-bolt-elements-background-depth-3
|
67 |
+
${arrowClassName}
|
68 |
+
`}
|
69 |
+
width={12}
|
70 |
+
height={6}
|
71 |
+
/>
|
72 |
+
</Tooltip.Content>
|
73 |
+
</Tooltip.Portal>
|
74 |
+
</Tooltip.Root>
|
75 |
+
);
|
76 |
+
},
|
77 |
+
);
|
78 |
|
79 |
export default WithTooltip;
|
app/lib/.server/llm/stream-text.ts
CHANGED
@@ -1,10 +1,20 @@
|
|
1 |
import { convertToCoreMessages, streamText as _streamText } from 'ai';
|
2 |
import { getModel } from '~/lib/.server/llm/model';
|
3 |
import { MAX_TOKENS } from './constants';
|
4 |
-
import { getSystemPrompt } from '
|
5 |
-
import {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
import ignore from 'ignore';
|
7 |
import type { IProviderSetting } from '~/types/model';
|
|
|
|
|
8 |
|
9 |
interface ToolResult<Name extends string, Args, Result> {
|
10 |
toolCallId: string;
|
@@ -139,8 +149,9 @@ export async function streamText(props: {
|
|
139 |
apiKeys?: Record<string, string>;
|
140 |
files?: FileMap;
|
141 |
providerSettings?: Record<string, IProviderSetting>;
|
|
|
142 |
}) {
|
143 |
-
const { messages, env, options, apiKeys, files, providerSettings } = props;
|
144 |
let currentModel = DEFAULT_MODEL;
|
145 |
let currentProvider = DEFAULT_PROVIDER.name;
|
146 |
const MODEL_LIST = await getModelList(apiKeys || {}, providerSettings);
|
@@ -170,11 +181,17 @@ export async function streamText(props: {
|
|
170 |
|
171 |
const dynamicMaxTokens = modelDetails && modelDetails.maxTokenAllowed ? modelDetails.maxTokenAllowed : MAX_TOKENS;
|
172 |
|
173 |
-
let systemPrompt =
|
|
|
|
|
|
|
|
|
|
|
174 |
let codeContext = '';
|
175 |
|
176 |
if (files) {
|
177 |
codeContext = createFilesContext(files);
|
|
|
178 |
systemPrompt = `${systemPrompt}\n\n ${codeContext}`;
|
179 |
}
|
180 |
|
|
|
1 |
import { convertToCoreMessages, streamText as _streamText } from 'ai';
|
2 |
import { getModel } from '~/lib/.server/llm/model';
|
3 |
import { MAX_TOKENS } from './constants';
|
4 |
+
import { getSystemPrompt } from '~/lib/common/prompts/prompts';
|
5 |
+
import {
|
6 |
+
DEFAULT_MODEL,
|
7 |
+
DEFAULT_PROVIDER,
|
8 |
+
getModelList,
|
9 |
+
MODEL_REGEX,
|
10 |
+
MODIFICATIONS_TAG_NAME,
|
11 |
+
PROVIDER_REGEX,
|
12 |
+
WORK_DIR,
|
13 |
+
} from '~/utils/constants';
|
14 |
import ignore from 'ignore';
|
15 |
import type { IProviderSetting } from '~/types/model';
|
16 |
+
import { PromptLibrary } from '~/lib/common/prompt-library';
|
17 |
+
import { allowedHTMLElements } from '~/utils/markdown';
|
18 |
|
19 |
interface ToolResult<Name extends string, Args, Result> {
|
20 |
toolCallId: string;
|
|
|
149 |
apiKeys?: Record<string, string>;
|
150 |
files?: FileMap;
|
151 |
providerSettings?: Record<string, IProviderSetting>;
|
152 |
+
promptId?: string;
|
153 |
}) {
|
154 |
+
const { messages, env, options, apiKeys, files, providerSettings, promptId } = props;
|
155 |
let currentModel = DEFAULT_MODEL;
|
156 |
let currentProvider = DEFAULT_PROVIDER.name;
|
157 |
const MODEL_LIST = await getModelList(apiKeys || {}, providerSettings);
|
|
|
181 |
|
182 |
const dynamicMaxTokens = modelDetails && modelDetails.maxTokenAllowed ? modelDetails.maxTokenAllowed : MAX_TOKENS;
|
183 |
|
184 |
+
let systemPrompt =
|
185 |
+
PromptLibrary.getPropmtFromLibrary(promptId || 'default', {
|
186 |
+
cwd: WORK_DIR,
|
187 |
+
allowedHtmlElements: allowedHTMLElements,
|
188 |
+
modificationTagName: MODIFICATIONS_TAG_NAME,
|
189 |
+
}) ?? getSystemPrompt();
|
190 |
let codeContext = '';
|
191 |
|
192 |
if (files) {
|
193 |
codeContext = createFilesContext(files);
|
194 |
+
codeContext = '';
|
195 |
systemPrompt = `${systemPrompt}\n\n ${codeContext}`;
|
196 |
}
|
197 |
|
app/lib/common/prompt-library.ts
ADDED
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { getSystemPrompt } from './prompts/prompts';
|
2 |
+
import optimized from './prompts/optimized';
|
3 |
+
|
4 |
+
export interface PromptOptions {
|
5 |
+
cwd: string;
|
6 |
+
allowedHtmlElements: string[];
|
7 |
+
modificationTagName: string;
|
8 |
+
}
|
9 |
+
|
10 |
+
export class PromptLibrary {
|
11 |
+
static library: Record<
|
12 |
+
string,
|
13 |
+
{
|
14 |
+
label: string;
|
15 |
+
description: string;
|
16 |
+
get: (options: PromptOptions) => string;
|
17 |
+
}
|
18 |
+
> = {
|
19 |
+
default: {
|
20 |
+
label: 'Default Prompt',
|
21 |
+
description: 'This is the battle tested default system Prompt',
|
22 |
+
get: (options) => getSystemPrompt(options.cwd),
|
23 |
+
},
|
24 |
+
optimized: {
|
25 |
+
label: 'Optimized Prompt (experimental)',
|
26 |
+
description: 'an Experimental version of the prompt for lower token usage',
|
27 |
+
get: (options) => optimized(options),
|
28 |
+
},
|
29 |
+
};
|
30 |
+
static getList() {
|
31 |
+
return Object.entries(this.library).map(([key, value]) => {
|
32 |
+
const { label, description } = value;
|
33 |
+
return {
|
34 |
+
id: key,
|
35 |
+
label,
|
36 |
+
description,
|
37 |
+
};
|
38 |
+
});
|
39 |
+
}
|
40 |
+
static getPropmtFromLibrary(promptId: string, options: PromptOptions) {
|
41 |
+
const prompt = this.library[promptId];
|
42 |
+
|
43 |
+
if (!prompt) {
|
44 |
+
throw 'Prompt Now Found';
|
45 |
+
}
|
46 |
+
|
47 |
+
return this.library[promptId]?.get(options);
|
48 |
+
}
|
49 |
+
}
|
app/lib/common/prompts/optimized.ts
ADDED
@@ -0,0 +1,199 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import type { PromptOptions } from '~/lib/common/prompt-library';
|
2 |
+
|
3 |
+
export default (options: PromptOptions) => {
|
4 |
+
const { cwd, allowedHtmlElements, modificationTagName } = options;
|
5 |
+
return `
|
6 |
+
You are Bolt, an expert AI assistant and exceptional senior software developer with vast knowledge across multiple programming languages, frameworks, and best practices.
|
7 |
+
|
8 |
+
<system_constraints>
|
9 |
+
- Operating in WebContainer, an in-browser Node.js runtime
|
10 |
+
- Limited Python support: standard library only, no pip
|
11 |
+
- No C/C++ compiler, native binaries, or Git
|
12 |
+
- Prefer Node.js scripts over shell scripts
|
13 |
+
- Use Vite for web servers
|
14 |
+
- Databases: prefer libsql, sqlite, or non-native solutions
|
15 |
+
- When for react dont forget to write vite config and index.html to the project
|
16 |
+
|
17 |
+
Available shell commands: cat, cp, ls, mkdir, mv, rm, rmdir, touch, hostname, ps, pwd, uptime, env, node, python3, code, jq, curl, head, sort, tail, clear, which, export, chmod, scho, kill, ln, xxd, alias, getconf, loadenv, wasm, xdg-open, command, exit, source
|
18 |
+
</system_constraints>
|
19 |
+
|
20 |
+
<code_formatting_info>
|
21 |
+
Use 2 spaces for indentation
|
22 |
+
</code_formatting_info>
|
23 |
+
|
24 |
+
<message_formatting_info>
|
25 |
+
Available HTML elements: ${allowedHtmlElements.join(', ')}
|
26 |
+
</message_formatting_info>
|
27 |
+
|
28 |
+
<diff_spec>
|
29 |
+
File modifications in \`<${modificationTagName}>\` section:
|
30 |
+
- \`<diff path="/path/to/file">\`: GNU unified diff format
|
31 |
+
- \`<file path="/path/to/file">\`: Full new content
|
32 |
+
</diff_spec>
|
33 |
+
|
34 |
+
<chain_of_thought_instructions>
|
35 |
+
do not mention the phrase "chain of thought"
|
36 |
+
Before solutions, briefly outline implementation steps (2-4 lines max):
|
37 |
+
- List concrete steps
|
38 |
+
- Identify key components
|
39 |
+
- Note potential challenges
|
40 |
+
- Do not write the actual code just the plan and structure if needed
|
41 |
+
- Once completed planning start writing the artifacts
|
42 |
+
</chain_of_thought_instructions>
|
43 |
+
|
44 |
+
<artifact_info>
|
45 |
+
Create a single, comprehensive artifact for each project:
|
46 |
+
- Use \`<boltArtifact>\` tags with \`title\` and \`id\` attributes
|
47 |
+
- Use \`<boltAction>\` tags with \`type\` attribute:
|
48 |
+
- shell: Run commands
|
49 |
+
- file: Write/update files (use \`filePath\` attribute)
|
50 |
+
- start: Start dev server (only when necessary)
|
51 |
+
- Order actions logically
|
52 |
+
- Install dependencies first
|
53 |
+
- Provide full, updated content for all files
|
54 |
+
- Use coding best practices: modular, clean, readable code
|
55 |
+
</artifact_info>
|
56 |
+
|
57 |
+
|
58 |
+
# CRITICAL RULES - NEVER IGNORE
|
59 |
+
|
60 |
+
## File and Command Handling
|
61 |
+
1. ALWAYS use artifacts for file contents and commands - NO EXCEPTIONS
|
62 |
+
2. When writing a file, INCLUDE THE ENTIRE FILE CONTENT - NO PARTIAL UPDATES
|
63 |
+
3. For modifications, ONLY alter files that require changes - DO NOT touch unaffected files
|
64 |
+
|
65 |
+
## Response Format
|
66 |
+
4. Use markdown EXCLUSIVELY - HTML tags are ONLY allowed within artifacts
|
67 |
+
5. Be concise - Explain ONLY when explicitly requested
|
68 |
+
6. NEVER use the word "artifact" in responses
|
69 |
+
|
70 |
+
## Development Process
|
71 |
+
7. ALWAYS think and plan comprehensively before providing a solution
|
72 |
+
8. Current working directory: \`${cwd} \` - Use this for all file paths
|
73 |
+
9. Don't use cli scaffolding to steup the project, use cwd as Root of the project
|
74 |
+
11. For nodejs projects ALWAYS install dependencies after writing package.json file
|
75 |
+
|
76 |
+
## Coding Standards
|
77 |
+
10. ALWAYS create smaller, atomic components and modules
|
78 |
+
11. Modularity is PARAMOUNT - Break down functionality into logical, reusable parts
|
79 |
+
12. IMMEDIATELY refactor any file exceeding 250 lines
|
80 |
+
13. ALWAYS plan refactoring before implementation - Consider impacts on the entire system
|
81 |
+
|
82 |
+
## Artifact Usage
|
83 |
+
22. Use \`<boltArtifact>\` tags with \`title\` and \`id\` attributes for each project
|
84 |
+
23. Use \`<boltAction>\` tags with appropriate \`type\` attribute:
|
85 |
+
- \`shell\`: For running commands
|
86 |
+
- \`file\`: For writing/updating files (include \`filePath\` attribute)
|
87 |
+
- \`start\`: For starting dev servers (use only when necessary/ or new dependencies are installed)
|
88 |
+
24. Order actions logically - dependencies MUST be installed first
|
89 |
+
25. For Vite project must include vite config and index.html for entry point
|
90 |
+
26. Provide COMPLETE, up-to-date content for all files - NO placeholders or partial updates
|
91 |
+
|
92 |
+
CRITICAL: These rules are ABSOLUTE and MUST be followed WITHOUT EXCEPTION in EVERY response.
|
93 |
+
|
94 |
+
Examples:
|
95 |
+
<examples>
|
96 |
+
<example>
|
97 |
+
<user_query>Can you help me create a JavaScript function to calculate the factorial of a number?</user_query>
|
98 |
+
<assistant_response>
|
99 |
+
Certainly, I can help you create a JavaScript function to calculate the factorial of a number.
|
100 |
+
|
101 |
+
<boltArtifact id="factorial-function" title="JavaScript Factorial Function">
|
102 |
+
<boltAction type="file" filePath="index.js">
|
103 |
+
function factorial(n) {
|
104 |
+
...
|
105 |
+
}
|
106 |
+
|
107 |
+
...
|
108 |
+
</boltAction>
|
109 |
+
<boltAction type="shell">
|
110 |
+
node index.js
|
111 |
+
</boltAction>
|
112 |
+
</boltArtifact>
|
113 |
+
</assistant_response>
|
114 |
+
</example>
|
115 |
+
|
116 |
+
<example>
|
117 |
+
<user_query>Build a snake game</user_query>
|
118 |
+
<assistant_response>
|
119 |
+
Certainly! I'd be happy to help you build a snake game using JavaScript and HTML5 Canvas. This will be a basic implementation that you can later expand upon. Let's create the game step by step.
|
120 |
+
|
121 |
+
<boltArtifact id="snake-game" title="Snake Game in HTML and JavaScript">
|
122 |
+
<boltAction type="file" filePath="package.json">
|
123 |
+
{
|
124 |
+
"name": "snake",
|
125 |
+
"scripts": {
|
126 |
+
"dev": "vite"
|
127 |
+
}
|
128 |
+
...
|
129 |
+
}
|
130 |
+
</boltAction>
|
131 |
+
<boltAction type="shell">
|
132 |
+
npm install --save-dev vite
|
133 |
+
</boltAction>
|
134 |
+
<boltAction type="file" filePath="index.html">
|
135 |
+
...
|
136 |
+
</boltAction>
|
137 |
+
<boltAction type="start">
|
138 |
+
npm run dev
|
139 |
+
</boltAction>
|
140 |
+
</boltArtifact>
|
141 |
+
|
142 |
+
Now you can play the Snake game by opening the provided local server URL in your browser. Use the arrow keys to control the snake. Eat the red food to grow and increase your score. The game ends if you hit the wall or your own tail.
|
143 |
+
</assistant_response>
|
144 |
+
</example>
|
145 |
+
|
146 |
+
<example>
|
147 |
+
<user_query>Make a bouncing ball with real gravity using React</user_query>
|
148 |
+
<assistant_response>
|
149 |
+
Certainly! I'll create a bouncing ball with real gravity using React. We'll use the react-spring library for physics-based animations.
|
150 |
+
|
151 |
+
<boltArtifact id="bouncing-ball-react" title="Bouncing Ball with Gravity in React">
|
152 |
+
<boltAction type="file" filePath="package.json">
|
153 |
+
{
|
154 |
+
"name": "bouncing-ball",
|
155 |
+
"private": true,
|
156 |
+
"version": "0.0.0",
|
157 |
+
"type": "module",
|
158 |
+
"scripts": {
|
159 |
+
"dev": "vite",
|
160 |
+
"build": "vite build",
|
161 |
+
"preview": "vite preview"
|
162 |
+
},
|
163 |
+
"dependencies": {
|
164 |
+
"react": "^18.2.0",
|
165 |
+
"react-dom": "^18.2.0",
|
166 |
+
"react-spring": "^9.7.1"
|
167 |
+
},
|
168 |
+
"devDependencies": {
|
169 |
+
"@types/react": "^18.0.28",
|
170 |
+
"@types/react-dom": "^18.0.11",
|
171 |
+
"@vitejs/plugin-react": "^3.1.0",
|
172 |
+
"vite": "^4.2.0"
|
173 |
+
}
|
174 |
+
}
|
175 |
+
</boltAction>
|
176 |
+
<boltAction type="file" filePath="index.html">
|
177 |
+
...
|
178 |
+
</boltAction>
|
179 |
+
<boltAction type="file" filePath="src/main.jsx">
|
180 |
+
...
|
181 |
+
</boltAction>
|
182 |
+
<boltAction type="file" filePath="src/index.css">
|
183 |
+
...
|
184 |
+
</boltAction>
|
185 |
+
<boltAction type="file" filePath="src/App.jsx">
|
186 |
+
...
|
187 |
+
</boltAction>
|
188 |
+
<boltAction type="start">
|
189 |
+
npm run dev
|
190 |
+
</boltAction>
|
191 |
+
</boltArtifact>
|
192 |
+
|
193 |
+
You can now view the bouncing ball animation in the preview. The ball will start falling from the top of the screen and bounce realistically when it hits the bottom.
|
194 |
+
</assistant_response>
|
195 |
+
</example>
|
196 |
+
</examples>
|
197 |
+
Always use artifacts for file contents and commands, following the format shown in these examples.
|
198 |
+
`;
|
199 |
+
};
|
app/lib/{.server/llm → common/prompts}/prompts.ts
RENAMED
File without changes
|
app/lib/hooks/useSettings.tsx
CHANGED
@@ -4,8 +4,9 @@ import {
|
|
4 |
isEventLogsEnabled,
|
5 |
isLocalModelsEnabled,
|
6 |
LOCAL_PROVIDERS,
|
|
|
7 |
providersStore,
|
8 |
-
|
9 |
} from '~/lib/stores/settings';
|
10 |
import { useCallback, useEffect, useState } from 'react';
|
11 |
import Cookies from 'js-cookie';
|
@@ -15,25 +16,34 @@ import commit from '~/commit.json';
|
|
15 |
|
16 |
interface CommitData {
|
17 |
commit: string;
|
|
|
18 |
}
|
19 |
|
|
|
|
|
20 |
export function useSettings() {
|
21 |
const providers = useStore(providersStore);
|
22 |
const debug = useStore(isDebugMode);
|
23 |
const eventLogs = useStore(isEventLogsEnabled);
|
|
|
24 |
const isLocalModel = useStore(isLocalModelsEnabled);
|
25 |
-
const
|
26 |
const [activeProviders, setActiveProviders] = useState<ProviderInfo[]>([]);
|
27 |
|
28 |
// Function to check if we're on stable version
|
29 |
const checkIsStableVersion = async () => {
|
30 |
try {
|
31 |
-
const stableResponse = await fetch(
|
|
|
|
|
|
|
32 |
if (!stableResponse.ok) {
|
33 |
console.warn('Failed to fetch stable commit info');
|
34 |
return false;
|
35 |
}
|
36 |
-
|
|
|
|
|
37 |
return commit.commit === stableData.commit;
|
38 |
} catch (error) {
|
39 |
console.warn('Error checking stable version:', error);
|
@@ -84,17 +94,30 @@ export function useSettings() {
|
|
84 |
isLocalModelsEnabled.set(savedLocalModels === 'true');
|
85 |
}
|
86 |
|
|
|
|
|
|
|
|
|
|
|
|
|
87 |
// load latest branch setting from cookies or determine based on version
|
88 |
-
const savedLatestBranch = Cookies.get('
|
89 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
90 |
// If setting hasn't been set by user, check version
|
91 |
-
checkIsStableVersion().then(isStable => {
|
92 |
const shouldUseLatest = !isStable;
|
93 |
-
|
94 |
-
Cookies.set('
|
|
|
95 |
});
|
96 |
} else {
|
97 |
-
|
98 |
}
|
99 |
}, []);
|
100 |
|
@@ -147,10 +170,14 @@ export function useSettings() {
|
|
147 |
Cookies.set('isLocalModelsEnabled', String(enabled));
|
148 |
}, []);
|
149 |
|
|
|
|
|
|
|
|
|
150 |
const enableLatestBranch = useCallback((enabled: boolean) => {
|
151 |
-
|
152 |
logStore.logSystem(`Main branch updates ${enabled ? 'enabled' : 'disabled'}`);
|
153 |
-
Cookies.set('
|
154 |
}, []);
|
155 |
|
156 |
return {
|
@@ -163,7 +190,9 @@ export function useSettings() {
|
|
163 |
enableEventLogs,
|
164 |
isLocalModel,
|
165 |
enableLocalModels,
|
166 |
-
|
|
|
|
|
167 |
enableLatestBranch,
|
168 |
};
|
169 |
}
|
|
|
4 |
isEventLogsEnabled,
|
5 |
isLocalModelsEnabled,
|
6 |
LOCAL_PROVIDERS,
|
7 |
+
promptStore,
|
8 |
providersStore,
|
9 |
+
latestBranchStore,
|
10 |
} from '~/lib/stores/settings';
|
11 |
import { useCallback, useEffect, useState } from 'react';
|
12 |
import Cookies from 'js-cookie';
|
|
|
16 |
|
17 |
interface CommitData {
|
18 |
commit: string;
|
19 |
+
version?: string;
|
20 |
}
|
21 |
|
22 |
+
const commitJson: CommitData = commit;
|
23 |
+
|
24 |
export function useSettings() {
|
25 |
const providers = useStore(providersStore);
|
26 |
const debug = useStore(isDebugMode);
|
27 |
const eventLogs = useStore(isEventLogsEnabled);
|
28 |
+
const promptId = useStore(promptStore);
|
29 |
const isLocalModel = useStore(isLocalModelsEnabled);
|
30 |
+
const isLatestBranch = useStore(latestBranchStore);
|
31 |
const [activeProviders, setActiveProviders] = useState<ProviderInfo[]>([]);
|
32 |
|
33 |
// Function to check if we're on stable version
|
34 |
const checkIsStableVersion = async () => {
|
35 |
try {
|
36 |
+
const stableResponse = await fetch(
|
37 |
+
`https://raw.githubusercontent.com/stackblitz-labs/bolt.diy/refs/tags/v${commitJson.version}/app/commit.json`,
|
38 |
+
);
|
39 |
+
|
40 |
if (!stableResponse.ok) {
|
41 |
console.warn('Failed to fetch stable commit info');
|
42 |
return false;
|
43 |
}
|
44 |
+
|
45 |
+
const stableData = (await stableResponse.json()) as CommitData;
|
46 |
+
|
47 |
return commit.commit === stableData.commit;
|
48 |
} catch (error) {
|
49 |
console.warn('Error checking stable version:', error);
|
|
|
94 |
isLocalModelsEnabled.set(savedLocalModels === 'true');
|
95 |
}
|
96 |
|
97 |
+
const promptId = Cookies.get('promptId');
|
98 |
+
|
99 |
+
if (promptId) {
|
100 |
+
promptStore.set(promptId);
|
101 |
+
}
|
102 |
+
|
103 |
// load latest branch setting from cookies or determine based on version
|
104 |
+
const savedLatestBranch = Cookies.get('isLatestBranch');
|
105 |
+
let checkCommit = Cookies.get('commitHash');
|
106 |
+
|
107 |
+
if (checkCommit === undefined) {
|
108 |
+
checkCommit = commit.commit;
|
109 |
+
}
|
110 |
+
|
111 |
+
if (savedLatestBranch === undefined || checkCommit !== commit.commit) {
|
112 |
// If setting hasn't been set by user, check version
|
113 |
+
checkIsStableVersion().then((isStable) => {
|
114 |
const shouldUseLatest = !isStable;
|
115 |
+
latestBranchStore.set(shouldUseLatest);
|
116 |
+
Cookies.set('isLatestBranch', String(shouldUseLatest));
|
117 |
+
Cookies.set('commitHash', String(commit.commit));
|
118 |
});
|
119 |
} else {
|
120 |
+
latestBranchStore.set(savedLatestBranch === 'true');
|
121 |
}
|
122 |
}, []);
|
123 |
|
|
|
170 |
Cookies.set('isLocalModelsEnabled', String(enabled));
|
171 |
}, []);
|
172 |
|
173 |
+
const setPromptId = useCallback((promptId: string) => {
|
174 |
+
promptStore.set(promptId);
|
175 |
+
Cookies.set('promptId', promptId);
|
176 |
+
}, []);
|
177 |
const enableLatestBranch = useCallback((enabled: boolean) => {
|
178 |
+
latestBranchStore.set(enabled);
|
179 |
logStore.logSystem(`Main branch updates ${enabled ? 'enabled' : 'disabled'}`);
|
180 |
+
Cookies.set('isLatestBranch', String(enabled));
|
181 |
}, []);
|
182 |
|
183 |
return {
|
|
|
190 |
enableEventLogs,
|
191 |
isLocalModel,
|
192 |
enableLocalModels,
|
193 |
+
promptId,
|
194 |
+
setPromptId,
|
195 |
+
isLatestBranch,
|
196 |
enableLatestBranch,
|
197 |
};
|
198 |
}
|
app/lib/stores/settings.ts
CHANGED
@@ -47,4 +47,6 @@ export const isEventLogsEnabled = atom(false);
|
|
47 |
|
48 |
export const isLocalModelsEnabled = atom(true);
|
49 |
|
50 |
-
export const
|
|
|
|
|
|
47 |
|
48 |
export const isLocalModelsEnabled = atom(true);
|
49 |
|
50 |
+
export const promptStore = atom<string>('default');
|
51 |
+
|
52 |
+
export const latestBranchStore = atom(false);
|
app/routes/api.chat.ts
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
import { type ActionFunctionArgs } from '@remix-run/cloudflare';
|
|
|
2 |
import { MAX_RESPONSE_SEGMENTS, MAX_TOKENS } from '~/lib/.server/llm/constants';
|
3 |
-
import { CONTINUE_PROMPT } from '~/lib
|
4 |
import { streamText, type Messages, type StreamingOptions } from '~/lib/.server/llm/stream-text';
|
5 |
import SwitchableStream from '~/lib/.server/llm/switchable-stream';
|
6 |
import type { IProviderSetting } from '~/types/model';
|
@@ -9,17 +10,15 @@ export async function action(args: ActionFunctionArgs) {
|
|
9 |
return chatAction(args);
|
10 |
}
|
11 |
|
12 |
-
function parseCookies(cookieHeader: string) {
|
13 |
-
const cookies:
|
14 |
|
15 |
-
// Split the cookie string by semicolons and spaces
|
16 |
const items = cookieHeader.split(';').map((cookie) => cookie.trim());
|
17 |
|
18 |
items.forEach((item) => {
|
19 |
const [name, ...rest] = item.split('=');
|
20 |
|
21 |
if (name && rest) {
|
22 |
-
// Decode the name and value, and join value parts in case it contains '='
|
23 |
const decodedName = decodeURIComponent(name.trim());
|
24 |
const decodedValue = decodeURIComponent(rest.join('=').trim());
|
25 |
cookies[decodedName] = decodedValue;
|
@@ -30,14 +29,13 @@ function parseCookies(cookieHeader: string) {
|
|
30 |
}
|
31 |
|
32 |
async function chatAction({ context, request }: ActionFunctionArgs) {
|
33 |
-
const { messages, files } = await request.json<{
|
34 |
messages: Messages;
|
35 |
files: any;
|
|
|
36 |
}>();
|
37 |
|
38 |
const cookieHeader = request.headers.get('Cookie');
|
39 |
-
|
40 |
-
// Parse the cookie's value (returns an object or null if no cookie exists)
|
41 |
const apiKeys = JSON.parse(parseCookies(cookieHeader || '').apiKeys || '{}');
|
42 |
const providerSettings: Record<string, IProviderSetting> = JSON.parse(
|
43 |
parseCookies(cookieHeader || '').providers || '{}',
|
@@ -45,12 +43,42 @@ async function chatAction({ context, request }: ActionFunctionArgs) {
|
|
45 |
|
46 |
const stream = new SwitchableStream();
|
47 |
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
try {
|
49 |
const options: StreamingOptions = {
|
50 |
toolChoice: 'none',
|
51 |
-
onFinish: async ({ text: content, finishReason }) => {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
if (finishReason !== 'length') {
|
53 |
-
return stream
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
}
|
55 |
|
56 |
if (stream.switches >= MAX_RESPONSE_SEGMENTS) {
|
@@ -71,9 +99,10 @@ async function chatAction({ context, request }: ActionFunctionArgs) {
|
|
71 |
apiKeys,
|
72 |
files,
|
73 |
providerSettings,
|
|
|
74 |
});
|
75 |
|
76 |
-
return stream.switchSource(result.
|
77 |
},
|
78 |
};
|
79 |
|
@@ -84,9 +113,10 @@ async function chatAction({ context, request }: ActionFunctionArgs) {
|
|
84 |
apiKeys,
|
85 |
files,
|
86 |
providerSettings,
|
|
|
87 |
});
|
88 |
|
89 |
-
stream.switchSource(result.
|
90 |
|
91 |
return new Response(stream.readable, {
|
92 |
status: 200,
|
@@ -95,7 +125,7 @@ async function chatAction({ context, request }: ActionFunctionArgs) {
|
|
95 |
},
|
96 |
});
|
97 |
} catch (error: any) {
|
98 |
-
console.
|
99 |
|
100 |
if (error.message?.includes('API key')) {
|
101 |
throw new Response('Invalid or missing API key', {
|
|
|
1 |
import { type ActionFunctionArgs } from '@remix-run/cloudflare';
|
2 |
+
import { createDataStream } from 'ai';
|
3 |
import { MAX_RESPONSE_SEGMENTS, MAX_TOKENS } from '~/lib/.server/llm/constants';
|
4 |
+
import { CONTINUE_PROMPT } from '~/lib/common/prompts/prompts';
|
5 |
import { streamText, type Messages, type StreamingOptions } from '~/lib/.server/llm/stream-text';
|
6 |
import SwitchableStream from '~/lib/.server/llm/switchable-stream';
|
7 |
import type { IProviderSetting } from '~/types/model';
|
|
|
10 |
return chatAction(args);
|
11 |
}
|
12 |
|
13 |
+
function parseCookies(cookieHeader: string): Record<string, string> {
|
14 |
+
const cookies: Record<string, string> = {};
|
15 |
|
|
|
16 |
const items = cookieHeader.split(';').map((cookie) => cookie.trim());
|
17 |
|
18 |
items.forEach((item) => {
|
19 |
const [name, ...rest] = item.split('=');
|
20 |
|
21 |
if (name && rest) {
|
|
|
22 |
const decodedName = decodeURIComponent(name.trim());
|
23 |
const decodedValue = decodeURIComponent(rest.join('=').trim());
|
24 |
cookies[decodedName] = decodedValue;
|
|
|
29 |
}
|
30 |
|
31 |
async function chatAction({ context, request }: ActionFunctionArgs) {
|
32 |
+
const { messages, files, promptId } = await request.json<{
|
33 |
messages: Messages;
|
34 |
files: any;
|
35 |
+
promptId?: string;
|
36 |
}>();
|
37 |
|
38 |
const cookieHeader = request.headers.get('Cookie');
|
|
|
|
|
39 |
const apiKeys = JSON.parse(parseCookies(cookieHeader || '').apiKeys || '{}');
|
40 |
const providerSettings: Record<string, IProviderSetting> = JSON.parse(
|
41 |
parseCookies(cookieHeader || '').providers || '{}',
|
|
|
43 |
|
44 |
const stream = new SwitchableStream();
|
45 |
|
46 |
+
const cumulativeUsage = {
|
47 |
+
completionTokens: 0,
|
48 |
+
promptTokens: 0,
|
49 |
+
totalTokens: 0,
|
50 |
+
};
|
51 |
+
|
52 |
try {
|
53 |
const options: StreamingOptions = {
|
54 |
toolChoice: 'none',
|
55 |
+
onFinish: async ({ text: content, finishReason, usage }) => {
|
56 |
+
console.log('usage', usage);
|
57 |
+
|
58 |
+
if (usage) {
|
59 |
+
cumulativeUsage.completionTokens += usage.completionTokens || 0;
|
60 |
+
cumulativeUsage.promptTokens += usage.promptTokens || 0;
|
61 |
+
cumulativeUsage.totalTokens += usage.totalTokens || 0;
|
62 |
+
}
|
63 |
+
|
64 |
if (finishReason !== 'length') {
|
65 |
+
return stream
|
66 |
+
.switchSource(
|
67 |
+
createDataStream({
|
68 |
+
async execute(dataStream) {
|
69 |
+
dataStream.writeMessageAnnotation({
|
70 |
+
type: 'usage',
|
71 |
+
value: {
|
72 |
+
completionTokens: cumulativeUsage.completionTokens,
|
73 |
+
promptTokens: cumulativeUsage.promptTokens,
|
74 |
+
totalTokens: cumulativeUsage.totalTokens,
|
75 |
+
},
|
76 |
+
});
|
77 |
+
},
|
78 |
+
onError: (error: any) => `Custom error: ${error.message}`,
|
79 |
+
}),
|
80 |
+
)
|
81 |
+
.then(() => stream.close());
|
82 |
}
|
83 |
|
84 |
if (stream.switches >= MAX_RESPONSE_SEGMENTS) {
|
|
|
99 |
apiKeys,
|
100 |
files,
|
101 |
providerSettings,
|
102 |
+
promptId,
|
103 |
});
|
104 |
|
105 |
+
return stream.switchSource(result.toDataStream());
|
106 |
},
|
107 |
};
|
108 |
|
|
|
113 |
apiKeys,
|
114 |
files,
|
115 |
providerSettings,
|
116 |
+
promptId,
|
117 |
});
|
118 |
|
119 |
+
stream.switchSource(result.toDataStream());
|
120 |
|
121 |
return new Response(stream.readable, {
|
122 |
status: 200,
|
|
|
125 |
},
|
126 |
});
|
127 |
} catch (error: any) {
|
128 |
+
console.error(error);
|
129 |
|
130 |
if (error.message?.includes('API key')) {
|
131 |
throw new Response('Invalid or missing API key', {
|
app/routes/api.enhancer.ts
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
import { type ActionFunctionArgs } from '@remix-run/cloudflare';
|
2 |
-
|
|
|
3 |
import { streamText } from '~/lib/.server/llm/stream-text';
|
4 |
import { stripIndents } from '~/utils/stripIndent';
|
5 |
import type { IProviderSetting, ProviderInfo } from '~/types/model';
|
@@ -73,32 +74,32 @@ async function enhancerAction({ context, request }: ActionFunctionArgs) {
|
|
73 |
`[Model: ${model}]\n\n[Provider: ${providerName}]\n\n` +
|
74 |
stripIndents`
|
75 |
You are a professional prompt engineer specializing in crafting precise, effective prompts.
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
},
|
103 |
],
|
104 |
env: context.cloudflare.env,
|
@@ -113,7 +114,7 @@ async function enhancerAction({ context, request }: ActionFunctionArgs) {
|
|
113 |
|
114 |
for (const line of lines) {
|
115 |
try {
|
116 |
-
const parsed =
|
117 |
|
118 |
if (parsed.type === 'text') {
|
119 |
controller.enqueue(encoder.encode(parsed.value));
|
@@ -128,7 +129,12 @@ async function enhancerAction({ context, request }: ActionFunctionArgs) {
|
|
128 |
|
129 |
const transformedStream = result.toDataStream().pipeThrough(transformStream);
|
130 |
|
131 |
-
return new
|
|
|
|
|
|
|
|
|
|
|
132 |
} catch (error: unknown) {
|
133 |
console.log(error);
|
134 |
|
|
|
1 |
import { type ActionFunctionArgs } from '@remix-run/cloudflare';
|
2 |
+
|
3 |
+
//import { StreamingTextResponse, parseStreamPart } from 'ai';
|
4 |
import { streamText } from '~/lib/.server/llm/stream-text';
|
5 |
import { stripIndents } from '~/utils/stripIndent';
|
6 |
import type { IProviderSetting, ProviderInfo } from '~/types/model';
|
|
|
74 |
`[Model: ${model}]\n\n[Provider: ${providerName}]\n\n` +
|
75 |
stripIndents`
|
76 |
You are a professional prompt engineer specializing in crafting precise, effective prompts.
|
77 |
+
Your task is to enhance prompts by making them more specific, actionable, and effective.
|
78 |
+
|
79 |
+
I want you to improve the user prompt that is wrapped in \`<original_prompt>\` tags.
|
80 |
+
|
81 |
+
For valid prompts:
|
82 |
+
- Make instructions explicit and unambiguous
|
83 |
+
- Add relevant context and constraints
|
84 |
+
- Remove redundant information
|
85 |
+
- Maintain the core intent
|
86 |
+
- Ensure the prompt is self-contained
|
87 |
+
- Use professional language
|
88 |
+
|
89 |
+
For invalid or unclear prompts:
|
90 |
+
- Respond with clear, professional guidance
|
91 |
+
- Keep responses concise and actionable
|
92 |
+
- Maintain a helpful, constructive tone
|
93 |
+
- Focus on what the user should provide
|
94 |
+
- Use a standard template for consistency
|
95 |
+
|
96 |
+
IMPORTANT: Your response must ONLY contain the enhanced prompt text.
|
97 |
+
Do not include any explanations, metadata, or wrapper tags.
|
98 |
+
|
99 |
+
<original_prompt>
|
100 |
+
${message}
|
101 |
+
</original_prompt>
|
102 |
+
`,
|
103 |
},
|
104 |
],
|
105 |
env: context.cloudflare.env,
|
|
|
114 |
|
115 |
for (const line of lines) {
|
116 |
try {
|
117 |
+
const parsed = JSON.parse(line);
|
118 |
|
119 |
if (parsed.type === 'text') {
|
120 |
controller.enqueue(encoder.encode(parsed.value));
|
|
|
129 |
|
130 |
const transformedStream = result.toDataStream().pipeThrough(transformStream);
|
131 |
|
132 |
+
return new Response(transformedStream, {
|
133 |
+
status: 200,
|
134 |
+
headers: {
|
135 |
+
'Content-Type': 'text/plain; charset=utf-8',
|
136 |
+
},
|
137 |
+
});
|
138 |
} catch (error: unknown) {
|
139 |
console.log(error);
|
140 |
|
app/utils/constants.ts
CHANGED
@@ -141,7 +141,7 @@ const PROVIDER_LIST: ProviderInfo[] = [
|
|
141 |
staticModels: [
|
142 |
{ name: 'llama-3.1-8b-instant', label: 'Llama 3.1 8b (Groq)', provider: 'Groq', maxTokenAllowed: 8000 },
|
143 |
{ name: 'llama-3.2-11b-vision-preview', label: 'Llama 3.2 11b (Groq)', provider: 'Groq', maxTokenAllowed: 8000 },
|
144 |
-
{ name: 'llama-3.2-90b-vision-preview', label: 'Llama 3.2 90b (Groq)', provider: 'Groq', maxTokenAllowed: 8000 },
|
145 |
{ name: 'llama-3.2-3b-preview', label: 'Llama 3.2 3b (Groq)', provider: 'Groq', maxTokenAllowed: 8000 },
|
146 |
{ name: 'llama-3.2-1b-preview', label: 'Llama 3.2 1b (Groq)', provider: 'Groq', maxTokenAllowed: 8000 },
|
147 |
{ name: 'llama-3.3-70b-versatile', label: 'Llama 3.3 70b (Groq)', provider: 'Groq', maxTokenAllowed: 8000 },
|
|
|
141 |
staticModels: [
|
142 |
{ name: 'llama-3.1-8b-instant', label: 'Llama 3.1 8b (Groq)', provider: 'Groq', maxTokenAllowed: 8000 },
|
143 |
{ name: 'llama-3.2-11b-vision-preview', label: 'Llama 3.2 11b (Groq)', provider: 'Groq', maxTokenAllowed: 8000 },
|
144 |
+
{ name: 'llama-3.2-90b-vision-preview', label: 'Llama 3.2 90b (Groq)', provider: 'Groq', maxTokenAllowed: 8000 },
|
145 |
{ name: 'llama-3.2-3b-preview', label: 'Llama 3.2 3b (Groq)', provider: 'Groq', maxTokenAllowed: 8000 },
|
146 |
{ name: 'llama-3.2-1b-preview', label: 'Llama 3.2 1b (Groq)', provider: 'Groq', maxTokenAllowed: 8000 },
|
147 |
{ name: 'llama-3.3-70b-versatile', label: 'Llama 3.3 70b (Groq)', provider: 'Groq', maxTokenAllowed: 8000 },
|
package.json
CHANGED
@@ -73,7 +73,7 @@
|
|
73 |
"@xterm/addon-fit": "^0.10.0",
|
74 |
"@xterm/addon-web-links": "^0.11.0",
|
75 |
"@xterm/xterm": "^5.5.0",
|
76 |
-
"ai": "^
|
77 |
"date-fns": "^3.6.0",
|
78 |
"diff": "^5.2.0",
|
79 |
"file-saver": "^2.0.5",
|
|
|
73 |
"@xterm/addon-fit": "^0.10.0",
|
74 |
"@xterm/addon-web-links": "^0.11.0",
|
75 |
"@xterm/xterm": "^5.5.0",
|
76 |
+
"ai": "^4.0.13",
|
77 |
"date-fns": "^3.6.0",
|
78 |
"diff": "^5.2.0",
|
79 |
"file-saver": "^2.0.5",
|
pnpm-lock.yaml
CHANGED
@@ -141,8 +141,8 @@ importers:
|
|
141 |
specifier: ^5.5.0
|
142 |
version: 5.5.0
|
143 |
ai:
|
144 |
-
specifier: ^
|
145 |
-
version:
|
146 |
date-fns:
|
147 |
specifier: ^3.6.0
|
148 |
version: 3.6.0
|
@@ -351,8 +351,8 @@ packages:
|
|
351 |
zod:
|
352 |
optional: true
|
353 |
|
354 |
-
'@ai-sdk/[email protected].
|
355 |
-
resolution: {integrity: sha512-
|
356 |
engines: {node: '>=18'}
|
357 |
peerDependencies:
|
358 |
zod: ^3.0.0
|
@@ -360,8 +360,8 @@ packages:
|
|
360 |
zod:
|
361 |
optional: true
|
362 |
|
363 |
-
'@ai-sdk/provider-utils@
|
364 |
-
resolution: {integrity: sha512-
|
365 |
engines: {node: '>=18'}
|
366 |
peerDependencies:
|
367 |
zod: ^3.0.0
|
@@ -369,8 +369,8 @@ packages:
|
|
369 |
zod:
|
370 |
optional: true
|
371 |
|
372 |
-
'@ai-sdk/[email protected].
|
373 |
-
resolution: {integrity: sha512-
|
374 |
engines: {node: '>=18'}
|
375 |
peerDependencies:
|
376 |
zod: ^3.0.0
|
@@ -390,16 +390,16 @@ packages:
|
|
390 |
resolution: {integrity: sha512-XMsNGJdGO+L0cxhhegtqZ8+T6nn4EoShS819OvCgI2kLbYTIvk0GWFGD0AXJmxkxs3DrpsJxKAFukFR7bvTkgQ==}
|
391 |
engines: {node: '>=18'}
|
392 |
|
393 |
-
'@ai-sdk/[email protected]':
|
394 |
-
resolution: {integrity: sha512-dQkfBDs2lTYpKM8389oopPdQgIU007GQyCbuPPrV+K6MtSII3HBfE0stUIMXUb44L+LK1t6GXPP7wjSzjO6uKg==}
|
395 |
-
engines: {node: '>=18'}
|
396 |
-
|
397 |
'@ai-sdk/[email protected]':
|
398 |
resolution: {integrity: sha512-mV+3iNDkzUsZ0pR2jG0sVzU6xtQY5DtSCBy3JFycLp6PwjyLw/iodfL3MwdmMCRJWgs3dadcHejRnMvF9nGTBg==}
|
399 |
engines: {node: '>=18'}
|
400 |
|
401 |
-
'@ai-sdk/
|
402 |
-
resolution: {integrity: sha512-
|
|
|
|
|
|
|
|
|
403 |
engines: {node: '>=18'}
|
404 |
peerDependencies:
|
405 |
react: ^18 || ^19 || ^19.0.0-rc
|
@@ -410,26 +410,8 @@ packages:
|
|
410 |
zod:
|
411 |
optional: true
|
412 |
|
413 |
-
'@ai-sdk/
|
414 |
-
resolution: {integrity: sha512-
|
415 |
-
engines: {node: '>=18'}
|
416 |
-
peerDependencies:
|
417 |
-
solid-js: ^1.7.7
|
418 |
-
peerDependenciesMeta:
|
419 |
-
solid-js:
|
420 |
-
optional: true
|
421 |
-
|
422 |
-
'@ai-sdk/[email protected]':
|
423 |
-
resolution: {integrity: sha512-SyF9ItIR9ALP9yDNAD+2/5Vl1IT6kchgyDH8xkmhysfJI6WrvJbtO1wdQ0nylvPLcsPoYu+cAlz1krU4lFHcYw==}
|
424 |
-
engines: {node: '>=18'}
|
425 |
-
peerDependencies:
|
426 |
-
svelte: ^3.0.0 || ^4.0.0 || ^5.0.0
|
427 |
-
peerDependenciesMeta:
|
428 |
-
svelte:
|
429 |
-
optional: true
|
430 |
-
|
431 |
-
'@ai-sdk/[email protected]':
|
432 |
-
resolution: {integrity: sha512-Z5QYJVW+5XpSaJ4jYCCAVG7zIAuKOOdikhgpksneNmKvx61ACFaf98pmOd+xnjahl0pIlc/QIe6O4yVaJ1sEaw==}
|
433 |
engines: {node: '>=18'}
|
434 |
peerDependencies:
|
435 |
zod: ^3.0.0
|
@@ -437,15 +419,6 @@ packages:
|
|
437 |
zod:
|
438 |
optional: true
|
439 |
|
440 |
-
'@ai-sdk/[email protected]':
|
441 |
-
resolution: {integrity: sha512-+ofYlnqdc8c4F6tM0IKF0+7NagZRAiqBJpGDJ+6EYhDW8FHLUP/JFBgu32SjxSxC6IKFZxEnl68ZoP/Z38EMlw==}
|
442 |
-
engines: {node: '>=18'}
|
443 |
-
peerDependencies:
|
444 |
-
vue: ^3.3.4
|
445 |
-
peerDependenciesMeta:
|
446 |
-
vue:
|
447 |
-
optional: true
|
448 |
-
|
449 |
'@ampproject/[email protected]':
|
450 |
resolution: {integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==}
|
451 |
engines: {node: '>=6.0.0'}
|
@@ -2370,35 +2343,6 @@ packages:
|
|
2370 |
'@vitest/[email protected]':
|
2371 |
resolution: {integrity: sha512-dwSoui6djdwbfFmIgbIjX2ZhIoG7Ex/+xpxyiEgIGzjliY8xGkcpITKTlp6B4MgtGkF2ilvm97cPM96XZaAgcA==}
|
2372 |
|
2373 |
-
'@vue/[email protected]':
|
2374 |
-
resolution: {integrity: sha512-oOdAkwqUfW1WqpwSYJce06wvt6HljgY3fGeM9NcVA1HaYOij3mZG9Rkysn0OHuyUAGMbEbARIpsG+LPVlBJ5/Q==}
|
2375 |
-
|
2376 |
-
'@vue/[email protected]':
|
2377 |
-
resolution: {integrity: sha512-ZOJ46sMOKUjO3e94wPdCzQ6P1Lx/vhp2RSvfaab88Ajexs0AHeV0uasYhi99WPaogmBlRHNRuly8xV75cNTMDA==}
|
2378 |
-
|
2379 |
-
'@vue/[email protected]':
|
2380 |
-
resolution: {integrity: sha512-6VdaljMpD82w6c2749Zhf5T9u5uLBWKnVue6XWxprDobftnletJ8+oel7sexFfM3qIxNmVE7LSFGTpv6obNyaQ==}
|
2381 |
-
|
2382 |
-
'@vue/[email protected]':
|
2383 |
-
resolution: {integrity: sha512-wMH6vrYHxQl/IybKJagqbquvxpWCuVYpoUJfCqFZwa/JY1GdATAQ+TgVtgrwwMZ0D07QhA99rs/EAAWfvG6KpA==}
|
2384 |
-
|
2385 |
-
'@vue/[email protected]':
|
2386 |
-
resolution: {integrity: sha512-NaCwtw8o48B9I6L1zl2p41OHo/2Z4wqYGGIK1Khu5T7yxrn+ATOixn/Udn2m+6kZKB/J7cuT9DbWWhRxqixACg==}
|
2387 |
-
|
2388 |
-
'@vue/[email protected]':
|
2389 |
-
resolution: {integrity: sha512-Fj4YRQ3Az0WTZw1sFe+QDb0aXCerigEpw418pw1HBUKFtnQHWzwojaukAs2X/c9DQz4MQ4bsXTGlcpGxU/RCIw==}
|
2390 |
-
|
2391 |
-
'@vue/[email protected]':
|
2392 |
-
resolution: {integrity: sha512-dLaj94s93NYLqjLiyFzVs9X6dWhTdAlEAciC3Moq7gzAc13VJUdCnjjRurNM6uTLFATRHexHCTu/Xp3eW6yoog==}
|
2393 |
-
|
2394 |
-
'@vue/[email protected]':
|
2395 |
-
resolution: {integrity: sha512-wAi4IRJV/2SAW3htkTlB+dHeRmpTiVIK1OGLWV1yeStVSebSQQOwGwIq0D3ZIoBj2C2qpgz5+vX9iEBkTdk5YA==}
|
2396 |
-
peerDependencies:
|
2397 |
-
vue: 3.5.13
|
2398 |
-
|
2399 |
-
'@vue/[email protected]':
|
2400 |
-
resolution: {integrity: sha512-/hnE/qP5ZoGpol0a5mDi45bOd7t3tjYJBjsgCsivow7D48cJeV5l05RD82lPqi7gRiphZM37rnhW1l6ZoCNNnQ==}
|
2401 |
-
|
2402 |
'@web3-storage/[email protected]':
|
2403 |
resolution: {integrity: sha512-BEO6al7BYqcnfX15W2cnGR+Q566ACXAT9UQykORCWW80lmkpWsnEob6zJS1ZVBKsSJC8+7vJkHwlp+lXG1UCdw==}
|
2404 |
|
@@ -2434,11 +2378,6 @@ packages:
|
|
2434 |
peerDependencies:
|
2435 |
acorn: ^6.0.0 || ^7.0.0 || ^8.0.0
|
2436 |
|
2437 | |
2438 |
-
resolution: {integrity: sha512-xsc9Xv0xlVfwp2o7sQ+GCQ1PgbkdcpWdTzrwXxO3xDMTAywVS3oXVOcOHuRjAPkS4P9b+yc/qNF15460v+jp4Q==}
|
2439 |
-
peerDependencies:
|
2440 |
-
acorn: '>=8.9.0'
|
2441 |
-
|
2442 | |
2443 |
resolution: {integrity: sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==}
|
2444 |
engines: {node: '>=0.4.0'}
|
@@ -2452,24 +2391,15 @@ packages:
|
|
2452 |
resolution: {integrity: sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==}
|
2453 |
engines: {node: '>=8'}
|
2454 |
|
2455 |
-
ai@
|
2456 |
-
resolution: {integrity: sha512-
|
2457 |
engines: {node: '>=18'}
|
2458 |
peerDependencies:
|
2459 |
-
openai: ^4.42.0
|
2460 |
react: ^18 || ^19 || ^19.0.0-rc
|
2461 |
-
sswr: ^2.1.0
|
2462 |
-
svelte: ^3.0.0 || ^4.0.0 || ^5.0.0
|
2463 |
zod: ^3.0.0
|
2464 |
peerDependenciesMeta:
|
2465 |
-
openai:
|
2466 |
-
optional: true
|
2467 |
react:
|
2468 |
optional: true
|
2469 |
-
sswr:
|
2470 |
-
optional: true
|
2471 |
-
svelte:
|
2472 |
-
optional: true
|
2473 |
zod:
|
2474 |
optional: true
|
2475 |
|
@@ -2506,10 +2436,6 @@ packages:
|
|
2506 |
resolution: {integrity: sha512-y+CcFFwelSXpLZk/7fMB2mUbGtX9lKycf1MWJ7CaTIERyitVlyQx6C+sxcROU2BAJ24OiZyK+8wj2i8AlBoS3A==}
|
2507 |
engines: {node: '>=10'}
|
2508 |
|
2509 | |
2510 |
-
resolution: {integrity: sha512-COROpnaoap1E2F000S62r6A60uHZnmlvomhfyT2DlTcrY1OrBKn2UhH7qn5wTC9zMvD0AY7csdPSNwKP+7WiQw==}
|
2511 |
-
engines: {node: '>= 0.4'}
|
2512 |
-
|
2513 | |
2514 |
resolution: {integrity: sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==}
|
2515 |
|
@@ -2537,10 +2463,6 @@ packages:
|
|
2537 |
resolution: {integrity: sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==}
|
2538 |
engines: {node: '>= 0.4'}
|
2539 |
|
2540 | |
2541 |
-
resolution: {integrity: sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ==}
|
2542 |
-
engines: {node: '>= 0.4'}
|
2543 |
-
|
2544 | |
2545 |
resolution: {integrity: sha512-0xO6mYd7JB2YesxDKplafRpsiOzPt9V02ddPCLbY1xYGPOX24NTyN50qnUxgCPcSoYMhKpAuBTjQoRZCAkUDRw==}
|
2546 |
|
@@ -3149,9 +3071,6 @@ packages:
|
|
3149 |
jiti:
|
3150 |
optional: true
|
3151 |
|
3152 | |
3153 |
-
resolution: {integrity: sha512-U9JedYYjCnadUlXk7e1Kr+aENQhtUaoaV9+gZm1T8LC/YBAPJx3NSPIAurFOC0U5vrdSevnUJS2/wUVxGwPhng==}
|
3154 |
-
|
3155 | |
3156 |
resolution: {integrity: sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg==}
|
3157 |
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
@@ -3164,9 +3083,6 @@ packages:
|
|
3164 |
resolution: {integrity: sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==}
|
3165 |
engines: {node: '>=0.10'}
|
3166 |
|
3167 | |
3168 |
-
resolution: {integrity: sha512-ZlQmCCK+n7SGoqo7DnfKaP1sJZa49P01/dXzmjCASSo04p72w8EksT2NMK8CEX8DhKsfJXANioIw8VyHNsBfvQ==}
|
3169 |
-
|
3170 | |
3171 |
resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==}
|
3172 |
engines: {node: '>=4.0'}
|
@@ -3820,9 +3736,6 @@ packages:
|
|
3820 |
resolution: {integrity: sha512-9rrA30MRRP3gBD3HTGnC6cDFpaE1kVDWxWgqWJUN0RvDNAo+Nz/9GxB+nHOH0ifbVFy0hSA1V6vFDvnx54lTEQ==}
|
3821 |
engines: {node: '>=14'}
|
3822 |
|
3823 | |
3824 |
-
resolution: {integrity: sha512-SW13ws7BjaeJ6p7Q6CO2nchbYEc3X3J6WrmTTDto7yMPqVSZTUyY5Tjbid+Ab8gLnATtygYtiDIJGQRRn2ZOiA==}
|
3825 |
-
|
3826 | |
3827 |
resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==}
|
3828 |
engines: {node: '>=10'}
|
@@ -5190,11 +5103,6 @@ packages:
|
|
5190 |
resolution: {integrity: sha512-MGrFH9Z4NP9Iyhqn16sDtBpRRNJ0Y2hNa6D65h736fVSaPCHr4DM4sWUNvVaSuC+0OBGhwsrydQwmgfg5LncqQ==}
|
5191 |
engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0}
|
5192 |
|
5193 | |
5194 |
-
resolution: {integrity: sha512-Cqc355SYlTAaUt8iDPaC/4DPPXK925PePLMxyBKuWd5kKc5mwsG3nT9+Mq2tyguL5s7b4Jg+IRMpTRsNTAfpSQ==}
|
5195 |
-
peerDependencies:
|
5196 |
-
svelte: ^4.0.0 || ^5.0.0-next.0
|
5197 |
-
|
5198 | |
5199 |
resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==}
|
5200 |
|
@@ -5285,23 +5193,11 @@ packages:
|
|
5285 |
resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==}
|
5286 |
engines: {node: '>= 0.4'}
|
5287 |
|
5288 | |
5289 |
-
resolution: {integrity: sha512-2I/mjD8cXDpKfdfUK+T6yo/OzugMXIm8lhyJUFM5F/gICMYnkl3C/+4cOSpia8TqpDsi6Qfm5+fdmBNMNmaf2g==}
|
5290 |
-
engines: {node: '>=18'}
|
5291 |
-
|
5292 | |
5293 |
resolution: {integrity: sha512-QtxqyclFeAsxEUeZIYmsaQ0UjimSq1RZ9Un7I68/0ClKK/U3LoyQunwkQfJZr2fc22DfIXLNDc2wFyTEikCUpg==}
|
5294 |
peerDependencies:
|
5295 |
react: ^16.11.0 || ^17.0.0 || ^18.0.0
|
5296 |
|
5297 | |
5298 |
-
resolution: {integrity: sha512-LqVcOHSB4cPGgitD1riJ1Hh4vdmITOp+BkmfmXRh4hSF/t7EnS4iD+SOTmq7w5pPm/SiPeto4ADbKS6dHUDWFA==}
|
5299 |
-
|
5300 | |
5301 |
-
resolution: {integrity: sha512-zjEkcP8Ywmj+xOJW3lIT65ciY/4AL4e/Or7Gj0MzU3zBJNMdJiT8geVZhINavnlHRMMCcJLHhraLTAiDOTmQ9g==}
|
5302 |
-
peerDependencies:
|
5303 |
-
vue: '>=3.2.26 < 4'
|
5304 |
-
|
5305 | |
5306 |
resolution: {integrity: sha512-8lD+t2KrrScJ/7KXCSyfhT3/hRq78rC0wBFqNJXv3mZyn6hW2ypM05JmlSvtqRbeq6jqA94oHbxAr2vYsJ8vDA==}
|
5307 |
engines: {node: '>=16.0.0'}
|
@@ -5721,14 +5617,6 @@ packages:
|
|
5721 | |
5722 |
resolution: {integrity: sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==}
|
5723 |
|
5724 | |
5725 |
-
resolution: {integrity: sha512-wmeiSMxkZCSc+PM2w2VRsOYAZC8GdipNFRTsLSfodVqI9mbejKeXEGr8SckuLnrQPGe3oJN5c3K0vpoU9q/wCQ==}
|
5726 |
-
peerDependencies:
|
5727 |
-
typescript: '*'
|
5728 |
-
peerDependenciesMeta:
|
5729 |
-
typescript:
|
5730 |
-
optional: true
|
5731 |
-
|
5732 | |
5733 |
resolution: {integrity: sha512-dpojBhNsCNN7T82Tm7k26A6G9ML3NkhDsnw9n/eoxSRlVBB4CEtIQ/KTCLI2Fwf3ataSXRhYFkQi3SlnFwPvPQ==}
|
5734 |
|
@@ -5843,9 +5731,6 @@ packages:
|
|
5843 | |
5844 |
resolution: {integrity: sha512-UeVBXie8cA35DS6+nBkls68xaBBXCye0CNznrhszZjTbRVnJKQuNsyLKBTTL4ln1o1rh2PKtv35twV7irj5SEg==}
|
5845 |
|
5846 | |
5847 |
-
resolution: {integrity: sha512-rAbqEGa8ovJy4pyBxZM70hg4pE6gDgaQ0Sl9M3enG3I0d6H4XSAM3GeNGLKnsBpuijUow064sf7ww1nutC5/3w==}
|
5848 |
-
|
5849 | |
5850 |
resolution: {integrity: sha512-5wlSS0bXfF/BrL4jPAbz9da5hDlDptdEppYfe+x4eIJ7jioqKG9uUxOwPzqof09u/XeVdrgFu29lZi+8XNDJtA==}
|
5851 |
peerDependencies:
|
@@ -5908,15 +5793,6 @@ snapshots:
|
|
5908 |
optionalDependencies:
|
5909 |
zod: 3.23.8
|
5910 |
|
5911 |
-
'@ai-sdk/[email protected]([email protected])':
|
5912 |
-
dependencies:
|
5913 |
-
'@ai-sdk/provider': 0.0.26
|
5914 |
-
eventsource-parser: 1.1.2
|
5915 |
-
nanoid: 3.3.8
|
5916 |
-
secure-json-parse: 2.7.0
|
5917 |
-
optionalDependencies:
|
5918 |
-
zod: 3.23.8
|
5919 |
-
|
5920 |
'@ai-sdk/[email protected]([email protected])':
|
5921 |
dependencies:
|
5922 |
'@ai-sdk/provider': 0.0.17
|
@@ -5935,6 +5811,15 @@ snapshots:
|
|
5935 |
optionalDependencies:
|
5936 |
zod: 3.23.8
|
5937 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5938 |
'@ai-sdk/[email protected]':
|
5939 |
dependencies:
|
5940 |
json-schema: 0.4.0
|
@@ -5947,61 +5832,32 @@ snapshots:
|
|
5947 |
dependencies:
|
5948 |
json-schema: 0.4.0
|
5949 |
|
5950 |
-
'@ai-sdk/provider@
|
5951 |
dependencies:
|
5952 |
json-schema: 0.4.0
|
5953 |
|
5954 |
-
'@ai-sdk/[email protected].
|
5955 |
dependencies:
|
5956 |
json-schema: 0.4.0
|
5957 |
|
5958 |
-
'@ai-sdk/react@
|
5959 |
dependencies:
|
5960 |
-
'@ai-sdk/provider-utils':
|
5961 |
-
'@ai-sdk/ui-utils':
|
5962 |
swr: 2.2.5([email protected])
|
5963 |
throttleit: 2.1.0
|
5964 |
optionalDependencies:
|
5965 |
react: 18.3.1
|
5966 |
zod: 3.23.8
|
5967 |
|
5968 |
-
'@ai-sdk/
|
5969 |
-
dependencies:
|
5970 |
-
'@ai-sdk/provider-utils': 1.0.22([email protected])
|
5971 |
-
'@ai-sdk/ui-utils': 0.0.50([email protected])
|
5972 |
-
transitivePeerDependencies:
|
5973 |
-
- zod
|
5974 |
-
|
5975 |
-
'@ai-sdk/[email protected]([email protected])([email protected])':
|
5976 |
-
dependencies:
|
5977 |
-
'@ai-sdk/provider-utils': 1.0.22([email protected])
|
5978 |
-
'@ai-sdk/ui-utils': 0.0.50([email protected])
|
5979 |
-
sswr: 2.1.0([email protected])
|
5980 |
-
optionalDependencies:
|
5981 |
-
svelte: 5.4.0
|
5982 |
-
transitivePeerDependencies:
|
5983 |
-
- zod
|
5984 |
-
|
5985 |
-
'@ai-sdk/[email protected]([email protected])':
|
5986 |
dependencies:
|
5987 |
-
'@ai-sdk/provider':
|
5988 |
-
'@ai-sdk/provider-utils':
|
5989 |
-
json-schema: 0.4.0
|
5990 |
-
secure-json-parse: 2.7.0
|
5991 |
zod-to-json-schema: 3.23.5([email protected])
|
5992 |
optionalDependencies:
|
5993 |
zod: 3.23.8
|
5994 |
|
5995 |
-
'@ai-sdk/[email protected]([email protected]([email protected]))([email protected])':
|
5996 |
-
dependencies:
|
5997 |
-
'@ai-sdk/provider-utils': 1.0.22([email protected])
|
5998 |
-
'@ai-sdk/ui-utils': 0.0.50([email protected])
|
5999 |
-
swrv: 1.0.4([email protected]([email protected]))
|
6000 |
-
optionalDependencies:
|
6001 |
-
vue: 3.5.13([email protected])
|
6002 |
-
transitivePeerDependencies:
|
6003 |
-
- zod
|
6004 |
-
|
6005 |
'@ampproject/[email protected]':
|
6006 |
dependencies:
|
6007 |
'@jridgewell/gen-mapping': 0.3.5
|
@@ -8045,60 +7901,6 @@ snapshots:
|
|
8045 |
loupe: 3.1.2
|
8046 |
tinyrainbow: 1.2.0
|
8047 |
|
8048 |
-
'@vue/[email protected]':
|
8049 |
-
dependencies:
|
8050 |
-
'@babel/parser': 7.26.2
|
8051 |
-
'@vue/shared': 3.5.13
|
8052 |
-
entities: 4.5.0
|
8053 |
-
estree-walker: 2.0.2
|
8054 |
-
source-map-js: 1.2.1
|
8055 |
-
|
8056 |
-
'@vue/[email protected]':
|
8057 |
-
dependencies:
|
8058 |
-
'@vue/compiler-core': 3.5.13
|
8059 |
-
'@vue/shared': 3.5.13
|
8060 |
-
|
8061 |
-
'@vue/[email protected]':
|
8062 |
-
dependencies:
|
8063 |
-
'@babel/parser': 7.26.2
|
8064 |
-
'@vue/compiler-core': 3.5.13
|
8065 |
-
'@vue/compiler-dom': 3.5.13
|
8066 |
-
'@vue/compiler-ssr': 3.5.13
|
8067 |
-
'@vue/shared': 3.5.13
|
8068 |
-
estree-walker: 2.0.2
|
8069 |
-
magic-string: 0.30.14
|
8070 |
-
postcss: 8.4.49
|
8071 |
-
source-map-js: 1.2.1
|
8072 |
-
|
8073 |
-
'@vue/[email protected]':
|
8074 |
-
dependencies:
|
8075 |
-
'@vue/compiler-dom': 3.5.13
|
8076 |
-
'@vue/shared': 3.5.13
|
8077 |
-
|
8078 |
-
'@vue/[email protected]':
|
8079 |
-
dependencies:
|
8080 |
-
'@vue/shared': 3.5.13
|
8081 |
-
|
8082 |
-
'@vue/[email protected]':
|
8083 |
-
dependencies:
|
8084 |
-
'@vue/reactivity': 3.5.13
|
8085 |
-
'@vue/shared': 3.5.13
|
8086 |
-
|
8087 |
-
'@vue/[email protected]':
|
8088 |
-
dependencies:
|
8089 |
-
'@vue/reactivity': 3.5.13
|
8090 |
-
'@vue/runtime-core': 3.5.13
|
8091 |
-
'@vue/shared': 3.5.13
|
8092 |
-
csstype: 3.1.3
|
8093 |
-
|
8094 |
-
'@vue/[email protected]([email protected]([email protected]))':
|
8095 |
-
dependencies:
|
8096 |
-
'@vue/compiler-ssr': 3.5.13
|
8097 |
-
'@vue/shared': 3.5.13
|
8098 |
-
vue: 3.5.13([email protected])
|
8099 |
-
|
8100 |
-
'@vue/[email protected]': {}
|
8101 |
-
|
8102 |
'@web3-storage/[email protected]': {}
|
8103 |
|
8104 |
'@webcontainer/[email protected]': {}
|
@@ -8129,10 +7931,6 @@ snapshots:
|
|
8129 |
dependencies:
|
8130 |
acorn: 8.14.0
|
8131 |
|
8132 | |
8133 |
-
dependencies:
|
8134 |
-
acorn: 8.14.0
|
8135 |
-
|
8136 | |
8137 |
dependencies:
|
8138 |
acorn: 8.14.0
|
@@ -8144,29 +7942,18 @@ snapshots:
|
|
8144 |
clean-stack: 2.2.0
|
8145 |
indent-string: 4.0.0
|
8146 |
|
8147 | |
8148 |
dependencies:
|
8149 |
-
'@ai-sdk/provider':
|
8150 |
-
'@ai-sdk/provider-utils':
|
8151 |
-
'@ai-sdk/react':
|
8152 |
-
'@ai-sdk/
|
8153 |
-
'@ai-sdk/svelte': 0.0.57([email protected])([email protected])
|
8154 |
-
'@ai-sdk/ui-utils': 0.0.50([email protected])
|
8155 |
-
'@ai-sdk/vue': 0.0.59([email protected]([email protected]))([email protected])
|
8156 |
'@opentelemetry/api': 1.9.0
|
8157 |
-
eventsource-parser: 1.1.2
|
8158 |
-
json-schema: 0.4.0
|
8159 |
jsondiffpatch: 0.6.0
|
8160 |
-
secure-json-parse: 2.7.0
|
8161 |
zod-to-json-schema: 3.23.5([email protected])
|
8162 |
optionalDependencies:
|
8163 |
react: 18.3.1
|
8164 |
-
sswr: 2.1.0([email protected])
|
8165 |
-
svelte: 5.4.0
|
8166 |
zod: 3.23.8
|
8167 |
-
transitivePeerDependencies:
|
8168 |
-
- solid-js
|
8169 |
-
- vue
|
8170 |
|
8171 | |
8172 |
dependencies:
|
@@ -8198,8 +7985,6 @@ snapshots:
|
|
8198 |
dependencies:
|
8199 |
tslib: 2.8.1
|
8200 |
|
8201 |
-
[email protected]: {}
|
8202 |
-
|
8203 | |
8204 |
|
8205 | |
@@ -8230,8 +8015,6 @@ snapshots:
|
|
8230 |
dependencies:
|
8231 |
possible-typed-array-names: 1.0.0
|
8232 |
|
8233 |
-
[email protected]: {}
|
8234 |
-
|
8235 | |
8236 |
|
8237 | |
@@ -8931,8 +8714,6 @@ snapshots:
|
|
8931 |
transitivePeerDependencies:
|
8932 |
- supports-color
|
8933 |
|
8934 |
-
[email protected]: {}
|
8935 |
-
|
8936 | |
8937 |
dependencies:
|
8938 |
acorn: 8.14.0
|
@@ -8949,11 +8730,6 @@ snapshots:
|
|
8949 |
dependencies:
|
8950 |
estraverse: 5.3.0
|
8951 |
|
8952 | |
8953 |
-
dependencies:
|
8954 |
-
'@jridgewell/sourcemap-codec': 1.5.0
|
8955 |
-
'@types/estree': 1.0.6
|
8956 |
-
|
8957 | |
8958 |
dependencies:
|
8959 |
estraverse: 5.3.0
|
@@ -9680,8 +9456,6 @@ snapshots:
|
|
9680 |
mlly: 1.7.3
|
9681 |
pkg-types: 1.2.1
|
9682 |
|
9683 |
-
[email protected]: {}
|
9684 |
-
|
9685 | |
9686 |
dependencies:
|
9687 |
p-locate: 5.0.0
|
@@ -11492,11 +11266,6 @@ snapshots:
|
|
11492 |
dependencies:
|
11493 |
minipass: 7.1.2
|
11494 |
|
11495 | |
11496 |
-
dependencies:
|
11497 |
-
svelte: 5.4.0
|
11498 |
-
swrev: 4.0.0
|
11499 |
-
|
11500 | |
11501 |
|
11502 | |
@@ -11587,34 +11356,12 @@ snapshots:
|
|
11587 |
|
11588 | |
11589 |
|
11590 | |
11591 |
-
dependencies:
|
11592 |
-
'@ampproject/remapping': 2.3.0
|
11593 |
-
'@jridgewell/sourcemap-codec': 1.5.0
|
11594 |
-
'@types/estree': 1.0.6
|
11595 |
-
acorn: 8.14.0
|
11596 |
-
acorn-typescript: 1.4.13([email protected])
|
11597 |
-
aria-query: 5.3.2
|
11598 |
-
axobject-query: 4.1.0
|
11599 |
-
esm-env: 1.2.1
|
11600 |
-
esrap: 1.2.3
|
11601 |
-
is-reference: 3.0.3
|
11602 |
-
locate-character: 3.0.0
|
11603 |
-
magic-string: 0.30.14
|
11604 |
-
zimmerframe: 1.1.2
|
11605 |
-
|
11606 | |
11607 |
dependencies:
|
11608 |
client-only: 0.0.1
|
11609 |
react: 18.3.1
|
11610 |
use-sync-external-store: 1.2.2([email protected])
|
11611 |
|
11612 |
-
[email protected]: {}
|
11613 |
-
|
11614 | |
11615 |
-
dependencies:
|
11616 |
-
vue: 3.5.13([email protected])
|
11617 |
-
|
11618 | |
11619 |
dependencies:
|
11620 |
sync-message-port: 1.1.3
|
@@ -12092,16 +11839,6 @@ snapshots:
|
|
12092 |
|
12093 | |
12094 |
|
12095 | |
12096 |
-
dependencies:
|
12097 |
-
'@vue/compiler-dom': 3.5.13
|
12098 |
-
'@vue/compiler-sfc': 3.5.13
|
12099 |
-
'@vue/runtime-dom': 3.5.13
|
12100 |
-
'@vue/server-renderer': 3.5.13([email protected]([email protected]))
|
12101 |
-
'@vue/shared': 3.5.13
|
12102 |
-
optionalDependencies:
|
12103 |
-
typescript: 5.7.2
|
12104 |
-
|
12105 | |
12106 |
|
12107 | |
@@ -12214,8 +11951,6 @@ snapshots:
|
|
12214 |
mustache: 4.2.0
|
12215 |
stacktracey: 2.1.8
|
12216 |
|
12217 |
-
[email protected]: {}
|
12218 |
-
|
12219 | |
12220 |
dependencies:
|
12221 |
zod: 3.23.8
|
|
|
141 |
specifier: ^5.5.0
|
142 |
version: 5.5.0
|
143 |
ai:
|
144 |
+
specifier: ^4.0.13
|
145 |
+
version: 4.0.18([email protected])([email protected])
|
146 |
date-fns:
|
147 |
specifier: ^3.6.0
|
148 |
version: 3.6.0
|
|
|
351 |
zod:
|
352 |
optional: true
|
353 |
|
354 |
+
'@ai-sdk/[email protected].9':
|
355 |
+
resolution: {integrity: sha512-yfdanjUiCJbtGoRGXrcrmXn0pTyDfRIeY6ozDG96D66f2wupZaZvAgKptUa3zDYXtUCQQvcNJ+tipBBfQD/UYA==}
|
356 |
engines: {node: '>=18'}
|
357 |
peerDependencies:
|
358 |
zod: ^3.0.0
|
|
|
360 |
zod:
|
361 |
optional: true
|
362 |
|
363 |
+
'@ai-sdk/provider-utils@2.0.2':
|
364 |
+
resolution: {integrity: sha512-IAvhKhdlXqiSmvx/D4uNlFYCl8dWT+M9K+IuEcSgnE2Aj27GWu8sDIpAf4r4Voc+wOUkOECVKQhFo8g9pozdjA==}
|
365 |
engines: {node: '>=18'}
|
366 |
peerDependencies:
|
367 |
zod: ^3.0.0
|
|
|
369 |
zod:
|
370 |
optional: true
|
371 |
|
372 |
+
'@ai-sdk/[email protected].4':
|
373 |
+
resolution: {integrity: sha512-GMhcQCZbwM6RoZCri0MWeEWXRt/T+uCxsmHEsTwNvEH3GDjNzchfX25C8ftry2MeEOOn6KfqCLSKomcgK6RoOg==}
|
374 |
engines: {node: '>=18'}
|
375 |
peerDependencies:
|
376 |
zod: ^3.0.0
|
|
|
390 |
resolution: {integrity: sha512-XMsNGJdGO+L0cxhhegtqZ8+T6nn4EoShS819OvCgI2kLbYTIvk0GWFGD0AXJmxkxs3DrpsJxKAFukFR7bvTkgQ==}
|
391 |
engines: {node: '>=18'}
|
392 |
|
|
|
|
|
|
|
|
|
393 |
'@ai-sdk/[email protected]':
|
394 |
resolution: {integrity: sha512-mV+3iNDkzUsZ0pR2jG0sVzU6xtQY5DtSCBy3JFycLp6PwjyLw/iodfL3MwdmMCRJWgs3dadcHejRnMvF9nGTBg==}
|
395 |
engines: {node: '>=18'}
|
396 |
|
397 |
+
'@ai-sdk/provider@1.0.2':
|
398 |
+
resolution: {integrity: sha512-YYtP6xWQyaAf5LiWLJ+ycGTOeBLWrED7LUrvc+SQIWhGaneylqbaGsyQL7VouQUeQ4JZ1qKYZuhmi3W56HADPA==}
|
399 |
+
engines: {node: '>=18'}
|
400 |
+
|
401 |
+
'@ai-sdk/[email protected]':
|
402 |
+
resolution: {integrity: sha512-8Hkserq0Ge6AEi7N4hlv2FkfglAGbkoAXEZ8YSp255c3PbnZz6+/5fppw+aROmZMOfNwallSRuy1i/iPa2rBpQ==}
|
403 |
engines: {node: '>=18'}
|
404 |
peerDependencies:
|
405 |
react: ^18 || ^19 || ^19.0.0-rc
|
|
|
410 |
zod:
|
411 |
optional: true
|
412 |
|
413 |
+
'@ai-sdk/ui-utils@1.0.5':
|
414 |
+
resolution: {integrity: sha512-DGJSbDf+vJyWmFNexSPUsS1AAy7gtsmFmoSyNbNbJjwl9hRIf2dknfA1V0ahx6pg3NNklNYFm53L8Nphjovfvg==}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
415 |
engines: {node: '>=18'}
|
416 |
peerDependencies:
|
417 |
zod: ^3.0.0
|
|
|
419 |
zod:
|
420 |
optional: true
|
421 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
422 |
'@ampproject/[email protected]':
|
423 |
resolution: {integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==}
|
424 |
engines: {node: '>=6.0.0'}
|
|
|
2343 |
'@vitest/[email protected]':
|
2344 |
resolution: {integrity: sha512-dwSoui6djdwbfFmIgbIjX2ZhIoG7Ex/+xpxyiEgIGzjliY8xGkcpITKTlp6B4MgtGkF2ilvm97cPM96XZaAgcA==}
|
2345 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2346 |
'@web3-storage/[email protected]':
|
2347 |
resolution: {integrity: sha512-BEO6al7BYqcnfX15W2cnGR+Q566ACXAT9UQykORCWW80lmkpWsnEob6zJS1ZVBKsSJC8+7vJkHwlp+lXG1UCdw==}
|
2348 |
|
|
|
2378 |
peerDependencies:
|
2379 |
acorn: ^6.0.0 || ^7.0.0 || ^8.0.0
|
2380 |
|
|
|
|
|
|
|
|
|
|
|
2381 | |
2382 |
resolution: {integrity: sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==}
|
2383 |
engines: {node: '>=0.4.0'}
|
|
|
2391 |
resolution: {integrity: sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==}
|
2392 |
engines: {node: '>=8'}
|
2393 |
|
2394 |
+
ai@4.0.18:
|
2395 |
+
resolution: {integrity: sha512-BTWzalLNE1LQphEka5xzJXDs5v4xXy1Uzr7dAVk+C/CnO3WNpuMBgrCymwUv0VrWaWc8xMQuh+OqsT7P7JyekQ==}
|
2396 |
engines: {node: '>=18'}
|
2397 |
peerDependencies:
|
|
|
2398 |
react: ^18 || ^19 || ^19.0.0-rc
|
|
|
|
|
2399 |
zod: ^3.0.0
|
2400 |
peerDependenciesMeta:
|
|
|
|
|
2401 |
react:
|
2402 |
optional: true
|
|
|
|
|
|
|
|
|
2403 |
zod:
|
2404 |
optional: true
|
2405 |
|
|
|
2436 |
resolution: {integrity: sha512-y+CcFFwelSXpLZk/7fMB2mUbGtX9lKycf1MWJ7CaTIERyitVlyQx6C+sxcROU2BAJ24OiZyK+8wj2i8AlBoS3A==}
|
2437 |
engines: {node: '>=10'}
|
2438 |
|
|
|
|
|
|
|
|
|
2439 | |
2440 |
resolution: {integrity: sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==}
|
2441 |
|
|
|
2463 |
resolution: {integrity: sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==}
|
2464 |
engines: {node: '>= 0.4'}
|
2465 |
|
|
|
|
|
|
|
|
|
2466 | |
2467 |
resolution: {integrity: sha512-0xO6mYd7JB2YesxDKplafRpsiOzPt9V02ddPCLbY1xYGPOX24NTyN50qnUxgCPcSoYMhKpAuBTjQoRZCAkUDRw==}
|
2468 |
|
|
|
3071 |
jiti:
|
3072 |
optional: true
|
3073 |
|
|
|
|
|
|
|
3074 | |
3075 |
resolution: {integrity: sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg==}
|
3076 |
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
|
|
3083 |
resolution: {integrity: sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==}
|
3084 |
engines: {node: '>=0.10'}
|
3085 |
|
|
|
|
|
|
|
3086 | |
3087 |
resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==}
|
3088 |
engines: {node: '>=4.0'}
|
|
|
3736 |
resolution: {integrity: sha512-9rrA30MRRP3gBD3HTGnC6cDFpaE1kVDWxWgqWJUN0RvDNAo+Nz/9GxB+nHOH0ifbVFy0hSA1V6vFDvnx54lTEQ==}
|
3737 |
engines: {node: '>=14'}
|
3738 |
|
|
|
|
|
|
|
3739 | |
3740 |
resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==}
|
3741 |
engines: {node: '>=10'}
|
|
|
5103 |
resolution: {integrity: sha512-MGrFH9Z4NP9Iyhqn16sDtBpRRNJ0Y2hNa6D65h736fVSaPCHr4DM4sWUNvVaSuC+0OBGhwsrydQwmgfg5LncqQ==}
|
5104 |
engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0}
|
5105 |
|
|
|
|
|
|
|
|
|
|
|
5106 | |
5107 |
resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==}
|
5108 |
|
|
|
5193 |
resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==}
|
5194 |
engines: {node: '>= 0.4'}
|
5195 |
|
|
|
|
|
|
|
|
|
5196 | |
5197 |
resolution: {integrity: sha512-QtxqyclFeAsxEUeZIYmsaQ0UjimSq1RZ9Un7I68/0ClKK/U3LoyQunwkQfJZr2fc22DfIXLNDc2wFyTEikCUpg==}
|
5198 |
peerDependencies:
|
5199 |
react: ^16.11.0 || ^17.0.0 || ^18.0.0
|
5200 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5201 | |
5202 |
resolution: {integrity: sha512-8lD+t2KrrScJ/7KXCSyfhT3/hRq78rC0wBFqNJXv3mZyn6hW2ypM05JmlSvtqRbeq6jqA94oHbxAr2vYsJ8vDA==}
|
5203 |
engines: {node: '>=16.0.0'}
|
|
|
5617 | |
5618 |
resolution: {integrity: sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==}
|
5619 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5620 | |
5621 |
resolution: {integrity: sha512-dpojBhNsCNN7T82Tm7k26A6G9ML3NkhDsnw9n/eoxSRlVBB4CEtIQ/KTCLI2Fwf3ataSXRhYFkQi3SlnFwPvPQ==}
|
5622 |
|
|
|
5731 | |
5732 |
resolution: {integrity: sha512-UeVBXie8cA35DS6+nBkls68xaBBXCye0CNznrhszZjTbRVnJKQuNsyLKBTTL4ln1o1rh2PKtv35twV7irj5SEg==}
|
5733 |
|
|
|
|
|
|
|
5734 | |
5735 |
resolution: {integrity: sha512-5wlSS0bXfF/BrL4jPAbz9da5hDlDptdEppYfe+x4eIJ7jioqKG9uUxOwPzqof09u/XeVdrgFu29lZi+8XNDJtA==}
|
5736 |
peerDependencies:
|
|
|
5793 |
optionalDependencies:
|
5794 |
zod: 3.23.8
|
5795 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5796 |
'@ai-sdk/[email protected]([email protected])':
|
5797 |
dependencies:
|
5798 |
'@ai-sdk/provider': 0.0.17
|
|
|
5811 |
optionalDependencies:
|
5812 |
zod: 3.23.8
|
5813 |
|
5814 |
+
'@ai-sdk/[email protected]([email protected])':
|
5815 |
+
dependencies:
|
5816 |
+
'@ai-sdk/provider': 1.0.2
|
5817 |
+
eventsource-parser: 3.0.0
|
5818 |
+
nanoid: 3.3.8
|
5819 |
+
secure-json-parse: 2.7.0
|
5820 |
+
optionalDependencies:
|
5821 |
+
zod: 3.23.8
|
5822 |
+
|
5823 |
'@ai-sdk/[email protected]':
|
5824 |
dependencies:
|
5825 |
json-schema: 0.4.0
|
|
|
5832 |
dependencies:
|
5833 |
json-schema: 0.4.0
|
5834 |
|
5835 |
+
'@ai-sdk/provider@1.0.1':
|
5836 |
dependencies:
|
5837 |
json-schema: 0.4.0
|
5838 |
|
5839 |
+
'@ai-sdk/[email protected].2':
|
5840 |
dependencies:
|
5841 |
json-schema: 0.4.0
|
5842 |
|
5843 |
+
'@ai-sdk/react@1.0.6([email protected])([email protected])':
|
5844 |
dependencies:
|
5845 |
+
'@ai-sdk/provider-utils': 2.0.4([email protected])
|
5846 |
+
'@ai-sdk/ui-utils': 1.0.5([email protected])
|
5847 |
swr: 2.2.5([email protected])
|
5848 |
throttleit: 2.1.0
|
5849 |
optionalDependencies:
|
5850 |
react: 18.3.1
|
5851 |
zod: 3.23.8
|
5852 |
|
5853 |
+
'@ai-sdk/ui-utils@1.0.5([email protected])':
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5854 |
dependencies:
|
5855 |
+
'@ai-sdk/provider': 1.0.2
|
5856 |
+
'@ai-sdk/provider-utils': 2.0.4([email protected])
|
|
|
|
|
5857 |
zod-to-json-schema: 3.23.5([email protected])
|
5858 |
optionalDependencies:
|
5859 |
zod: 3.23.8
|
5860 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5861 |
'@ampproject/[email protected]':
|
5862 |
dependencies:
|
5863 |
'@jridgewell/gen-mapping': 0.3.5
|
|
|
7901 |
loupe: 3.1.2
|
7902 |
tinyrainbow: 1.2.0
|
7903 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7904 |
'@web3-storage/[email protected]': {}
|
7905 |
|
7906 |
'@webcontainer/[email protected]': {}
|
|
|
7931 |
dependencies:
|
7932 |
acorn: 8.14.0
|
7933 |
|
|
|
|
|
|
|
|
|
7934 | |
7935 |
dependencies:
|
7936 |
acorn: 8.14.0
|
|
|
7942 |
clean-stack: 2.2.0
|
7943 |
indent-string: 4.0.0
|
7944 |
|
7945 |
+
ai@4.0.18([email protected])([email protected]):
|
7946 |
dependencies:
|
7947 |
+
'@ai-sdk/provider': 1.0.2
|
7948 |
+
'@ai-sdk/provider-utils': 2.0.4([email protected])
|
7949 |
+
'@ai-sdk/react': 1.0.6([email protected])([email protected])
|
7950 |
+
'@ai-sdk/ui-utils': 1.0.5([email protected])
|
|
|
|
|
|
|
7951 |
'@opentelemetry/api': 1.9.0
|
|
|
|
|
7952 |
jsondiffpatch: 0.6.0
|
|
|
7953 |
zod-to-json-schema: 3.23.5([email protected])
|
7954 |
optionalDependencies:
|
7955 |
react: 18.3.1
|
|
|
|
|
7956 |
zod: 3.23.8
|
|
|
|
|
|
|
7957 |
|
7958 | |
7959 |
dependencies:
|
|
|
7985 |
dependencies:
|
7986 |
tslib: 2.8.1
|
7987 |
|
|
|
|
|
7988 | |
7989 |
|
7990 | |
|
|
8015 |
dependencies:
|
8016 |
possible-typed-array-names: 1.0.0
|
8017 |
|
|
|
|
|
8018 | |
8019 |
|
8020 | |
|
|
8714 |
transitivePeerDependencies:
|
8715 |
- supports-color
|
8716 |
|
|
|
|
|
8717 | |
8718 |
dependencies:
|
8719 |
acorn: 8.14.0
|
|
|
8730 |
dependencies:
|
8731 |
estraverse: 5.3.0
|
8732 |
|
|
|
|
|
|
|
|
|
|
|
8733 | |
8734 |
dependencies:
|
8735 |
estraverse: 5.3.0
|
|
|
9456 |
mlly: 1.7.3
|
9457 |
pkg-types: 1.2.1
|
9458 |
|
|
|
|
|
9459 | |
9460 |
dependencies:
|
9461 |
p-locate: 5.0.0
|
|
|
11266 |
dependencies:
|
11267 |
minipass: 7.1.2
|
11268 |
|
|
|
|
|
|
|
|
|
|
|
11269 | |
11270 |
|
11271 | |
|
|
11356 |
|
11357 | |
11358 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11359 | |
11360 |
dependencies:
|
11361 |
client-only: 0.0.1
|
11362 |
react: 18.3.1
|
11363 |
use-sync-external-store: 1.2.2([email protected])
|
11364 |
|
|
|
|
|
|
|
|
|
|
|
|
|
11365 | |
11366 |
dependencies:
|
11367 |
sync-message-port: 1.1.3
|
|
|
11839 |
|
11840 | |
11841 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11842 | |
11843 |
|
11844 | |
|
|
11951 |
mustache: 4.2.0
|
11952 |
stacktracey: 2.1.8
|
11953 |
|
|
|
|
|
11954 | |
11955 |
dependencies:
|
11956 |
zod: 3.23.8
|
public/apple-touch-icon-precomposed.png
ADDED
![]() |
public/apple-touch-icon.png
ADDED
![]() |