@vibes.diy/prompts 0.19.8-dev → 0.19.14-dev-cli
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/chat.d.ts +11 -11
- package/component-export-transforms.js.map +1 -1
- package/component-transforms.js +11 -39
- package/component-transforms.js.map +1 -1
- package/index.d.ts +1 -2
- package/index.js +1 -2
- package/index.js.map +1 -1
- package/json-docs.d.ts +4 -6
- package/json-docs.js +15 -18
- package/json-docs.js.map +1 -1
- package/llms/d3.md +16 -73
- package/llms/index.js +1 -8
- package/llms/index.js.map +1 -1
- package/llms/three-js.md +56 -184
- package/load-docs.ts-off +16 -0
- package/package.json +10 -5
- package/prompts.d.ts +6 -6
- package/prompts.js +108 -158
- package/prompts.js.map +1 -1
- package/segment-parser.js +6 -16
- package/segment-parser.js.map +1 -1
- package/style-prompts.js.map +1 -1
- package/txt-docs.ts-off +58 -0
- package/load-docs.d.ts +0 -2
- package/load-docs.js +0 -17
- package/load-docs.js.map +0 -1
- package/txt-docs.d.ts +0 -6
- package/txt-docs.js +0 -49
- package/txt-docs.js.map +0 -1
package/prompts.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { getJsonDocs, getLlmCatalog, getLlmCatalogNames, } from "./json-docs.js";
|
|
4
|
-
import { getTexts } from "./txt-docs.js";
|
|
1
|
+
import { exception2Result, loadAsset, KeyedResolvOnce } from "@adviser/cement";
|
|
2
|
+
import { getLlmCatalog, getLlmCatalogNames } from "./json-docs.js";
|
|
5
3
|
import { defaultStylePrompt } from "./style-prompts.js";
|
|
6
4
|
export const DEFAULT_CODING_MODEL = "anthropic/claude-opus-4.5";
|
|
7
5
|
const RAG_DECISION_MODEL = "openai/gpt-4o";
|
|
@@ -32,27 +30,7 @@ export async function resolveEffectiveModel(settingsDoc, vibeDoc) {
|
|
|
32
30
|
export async function getDefaultDependencies() {
|
|
33
31
|
return ["fireproof", "callai"];
|
|
34
32
|
}
|
|
35
|
-
function
|
|
36
|
-
return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
37
|
-
}
|
|
38
|
-
const llmImportRegexes = Lazy((fallBackUrl) => {
|
|
39
|
-
return getJsonDocs(fallBackUrl).then((docs) => Object.values(docs)
|
|
40
|
-
.map((d) => d.obj)
|
|
41
|
-
.filter((l) => l.importModule && l.importName)
|
|
42
|
-
.map((l) => {
|
|
43
|
-
const mod = escapeRegExp(l.importModule);
|
|
44
|
-
const name = escapeRegExp(l.importName);
|
|
45
|
-
const importType = l.importType || "named";
|
|
46
|
-
return {
|
|
47
|
-
name: l.name,
|
|
48
|
-
named: new RegExp(`import\\s*\\{[^}]*\\b${name}\\b[^}]*\\}\\s*from\\s*['\\"]${mod}['\\"]`),
|
|
49
|
-
def: new RegExp(`import\\s+${name}\\s+from\\s*['\\"]${mod}['\\"]`),
|
|
50
|
-
namespace: new RegExp(`import\\s*\\*\\s*as\\s+${name}\\s+from\\s*['\\"]${mod}['\\"]`),
|
|
51
|
-
importType,
|
|
52
|
-
};
|
|
53
|
-
}));
|
|
54
|
-
});
|
|
55
|
-
async function detectModulesInHistory(history, opts) {
|
|
33
|
+
async function detectModulesInHistory(history, _opts) {
|
|
56
34
|
const detected = new Set();
|
|
57
35
|
if (!Array.isArray(history))
|
|
58
36
|
return detected;
|
|
@@ -60,27 +38,20 @@ async function detectModulesInHistory(history, opts) {
|
|
|
60
38
|
const content = msg?.content || "";
|
|
61
39
|
if (!content || typeof content !== "string")
|
|
62
40
|
continue;
|
|
63
|
-
for (const { name, named, def, namespace } of await llmImportRegexes(
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
}
|
|
41
|
+
// for (const { name, named, def, namespace } of await llmImportRegexes()) {
|
|
42
|
+
// if (named.test(content) || def.test(content) || namespace.test(content)) {
|
|
43
|
+
// detected.add(name);
|
|
44
|
+
// }
|
|
45
|
+
// }
|
|
68
46
|
}
|
|
69
47
|
return detected;
|
|
70
48
|
}
|
|
71
|
-
async function sleepReject(ms) {
|
|
72
|
-
return new Promise((_, rj) => setTimeout(rj, ms));
|
|
73
|
-
}
|
|
74
49
|
async function selectLlmsAndOptions(model, userPrompt, history, iopts) {
|
|
75
50
|
const opts = {
|
|
76
|
-
appMode: "production",
|
|
77
51
|
...iopts,
|
|
78
|
-
|
|
79
|
-
fallBackUrl: URI.from(iopts.fallBackUrl ??
|
|
80
|
-
"https://esm.sh/use-vibes@0.18.9/prompt-catalog/llms").toString(),
|
|
81
|
-
getAuthToken: iopts.getAuthToken,
|
|
52
|
+
mode: iopts.appMode === "test" ? "test" : "production",
|
|
82
53
|
};
|
|
83
|
-
const llmsCatalog = await getLlmCatalog(
|
|
54
|
+
const llmsCatalog = await getLlmCatalog();
|
|
84
55
|
const catalog = llmsCatalog.map((l) => ({
|
|
85
56
|
name: l.name,
|
|
86
57
|
description: l.description || "",
|
|
@@ -93,62 +64,37 @@ async function selectLlmsAndOptions(model, userPrompt, history, iopts) {
|
|
|
93
64
|
const messages = [
|
|
94
65
|
{
|
|
95
66
|
role: "system",
|
|
96
|
-
content:
|
|
67
|
+
content: [
|
|
68
|
+
{
|
|
69
|
+
type: "text",
|
|
70
|
+
text: `You select which library modules from a catalog should
|
|
71
|
+
be included AND whether to include a demo-data button.
|
|
72
|
+
First analyze if the user prompt describes specific
|
|
73
|
+
look & feel requirements. For demo data: include it
|
|
74
|
+
only when asked for. Read the JSON payload and return
|
|
75
|
+
JSON with properties:
|
|
76
|
+
"selected" (array of catalog "name" strings) and "demoData" (boolean).
|
|
77
|
+
Only choose modules from the catalog. Include any
|
|
78
|
+
libraries already used in history. Respond with JSON only.`,
|
|
79
|
+
},
|
|
80
|
+
],
|
|
97
81
|
},
|
|
98
|
-
{ role: "user", content: JSON.stringify(payload) },
|
|
82
|
+
{ role: "user", content: [{ type: "text", text: JSON.stringify(payload) }] },
|
|
99
83
|
];
|
|
100
|
-
const
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
apiKey: (await opts.getAuthToken?.()) || "",
|
|
105
|
-
model,
|
|
106
|
-
schema: {
|
|
107
|
-
name: "module_and_options_selection",
|
|
108
|
-
properties: {
|
|
109
|
-
selected: { type: "array", items: { type: "string" } },
|
|
110
|
-
demoData: { type: "boolean" },
|
|
111
|
-
},
|
|
112
|
-
},
|
|
113
|
-
max_tokens: 2000,
|
|
114
|
-
headers: {
|
|
115
|
-
"HTTP-Referer": "https://vibes.diy",
|
|
116
|
-
"X-Title": "Vibes DIY",
|
|
117
|
-
},
|
|
118
|
-
mock: opts.mock,
|
|
119
|
-
};
|
|
120
|
-
try {
|
|
121
|
-
const withTimeout = (p, ms = 4000) => Promise.race([
|
|
122
|
-
sleepReject(ms).then((val) => {
|
|
123
|
-
console.warn("Module/options selection: API call timed out after", ms, "ms");
|
|
124
|
-
return val;
|
|
125
|
-
}),
|
|
126
|
-
p
|
|
127
|
-
.then((val) => {
|
|
128
|
-
return val;
|
|
129
|
-
})
|
|
130
|
-
.catch((err) => {
|
|
131
|
-
console.warn("Module/options selection: API call failed with error:", err);
|
|
132
|
-
throw err;
|
|
133
|
-
}),
|
|
134
|
-
]);
|
|
135
|
-
const raw = (await withTimeout((options.mock?.callAI || callAI)(messages, options)));
|
|
136
|
-
if (raw === undefined || raw === null) {
|
|
137
|
-
console.warn("Module/options selection: call-ai returned undefined with schema present");
|
|
138
|
-
console.warn("This is a known issue in the prompts package environment");
|
|
139
|
-
return { selected: [], demoData: true };
|
|
140
|
-
}
|
|
141
|
-
const parsed = JSON.parse(raw) ?? {};
|
|
142
|
-
const selected = Array.isArray(parsed?.selected)
|
|
143
|
-
? parsed.selected.filter((v) => typeof v === "string")
|
|
144
|
-
: [];
|
|
145
|
-
const demoData = typeof parsed?.demoData === "boolean" ? parsed.demoData : true;
|
|
146
|
-
return { selected, demoData };
|
|
84
|
+
const rRaw = await opts.callAi.ModuleAndOptionsSelection(messages);
|
|
85
|
+
if (rRaw.isErr()) {
|
|
86
|
+
console.warn("Module/options selection call failed:", rRaw.Err());
|
|
87
|
+
return { selected: [], demoData: true };
|
|
147
88
|
}
|
|
148
|
-
|
|
149
|
-
|
|
89
|
+
const rParsed = exception2Result(() => JSON.parse(rRaw.Ok()) ?? {});
|
|
90
|
+
if (rParsed.isErr()) {
|
|
91
|
+
console.warn("Module/options selection: Failed to parse JSON response:", rRaw.Ok());
|
|
150
92
|
return { selected: [], demoData: true };
|
|
151
93
|
}
|
|
94
|
+
const parsed = rParsed.Ok();
|
|
95
|
+
const selected = Array.isArray(parsed?.selected) ? parsed.selected.filter((v) => typeof v === "string") : [];
|
|
96
|
+
const demoData = typeof parsed?.demoData === "boolean" ? parsed.demoData : true;
|
|
97
|
+
return { selected, demoData };
|
|
152
98
|
}
|
|
153
99
|
export function generateImportStatements(llms) {
|
|
154
100
|
const seen = new Set();
|
|
@@ -177,18 +123,17 @@ export function generateImportStatements(llms) {
|
|
|
177
123
|
})
|
|
178
124
|
.join("");
|
|
179
125
|
}
|
|
126
|
+
const keyedLoadAsset = new KeyedResolvOnce();
|
|
180
127
|
export async function makeBaseSystemPrompt(model, sessionDoc) {
|
|
181
128
|
const userPrompt = sessionDoc?.userPrompt || "";
|
|
182
|
-
const history = Array.isArray(sessionDoc?.history)
|
|
183
|
-
? sessionDoc.history
|
|
184
|
-
: [];
|
|
129
|
+
const history = Array.isArray(sessionDoc?.history) ? sessionDoc.history : [];
|
|
185
130
|
const useOverride = !!sessionDoc?.dependenciesUserOverride;
|
|
186
131
|
let selectedNames = [];
|
|
187
132
|
let includeDemoData = true;
|
|
188
|
-
const llmsCatalog = await getLlmCatalog(
|
|
189
|
-
const llmsCatalogNames = await getLlmCatalogNames(
|
|
190
|
-
if (useOverride
|
|
191
|
-
selectedNames = sessionDoc.dependencies
|
|
133
|
+
const llmsCatalog = await getLlmCatalog();
|
|
134
|
+
const llmsCatalogNames = await getLlmCatalogNames();
|
|
135
|
+
if (useOverride) {
|
|
136
|
+
selectedNames = (sessionDoc.dependencies ?? [])
|
|
192
137
|
.filter((v) => typeof v === "string")
|
|
193
138
|
.filter((name) => llmsCatalogNames.has(name));
|
|
194
139
|
}
|
|
@@ -205,69 +150,79 @@ export async function makeBaseSystemPrompt(model, sessionDoc) {
|
|
|
205
150
|
includeDemoData = sessionDoc.demoDataOverride;
|
|
206
151
|
}
|
|
207
152
|
const chosenLlms = llmsCatalog.filter((l) => selectedNames.includes(l.name));
|
|
208
|
-
|
|
153
|
+
const concatenatedLlmsTxts = [];
|
|
209
154
|
for (const llm of chosenLlms) {
|
|
210
|
-
const
|
|
211
|
-
|
|
212
|
-
|
|
155
|
+
const rText = await keyedLoadAsset.get(llm.name).once(async () => {
|
|
156
|
+
return loadAsset(`./llms/${llm.name}.txt`, {
|
|
157
|
+
fallBackUrl: "https://esm.sh/prompts/",
|
|
158
|
+
basePath: () => {
|
|
159
|
+
const dir = import.meta.url;
|
|
160
|
+
return dir;
|
|
161
|
+
},
|
|
162
|
+
mock: {
|
|
163
|
+
fetch: sessionDoc.fetch,
|
|
164
|
+
},
|
|
165
|
+
});
|
|
166
|
+
});
|
|
167
|
+
if (rText.isErr()) {
|
|
168
|
+
console.warn(`Failed to load text for LLM ${llm.name} at path ${import.meta.dirname}/./llms/${llm.name}.txt:`, rText.Err());
|
|
213
169
|
continue;
|
|
214
170
|
}
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
</${llm.label}-docs>
|
|
219
|
-
`;
|
|
171
|
+
concatenatedLlmsTxts.push(`<${llm.label}-docs>`);
|
|
172
|
+
concatenatedLlmsTxts.push(rText.Ok() ?? "");
|
|
173
|
+
concatenatedLlmsTxts.push(`</${llm.label}-docs>`);
|
|
220
174
|
}
|
|
175
|
+
const concatenatedLlmsTxt = concatenatedLlmsTxts.join("\n");
|
|
221
176
|
const stylePrompt = sessionDoc?.stylePrompt || defaultStylePrompt;
|
|
222
177
|
const demoDataLines = includeDemoData
|
|
223
178
|
? `- If your app has a function that uses callAI with a schema to save data, include a Demo Data button that calls that function with an example prompt. Don't write an extra function, use real app code so the data illustrates what it looks like to use the app.\n- Never have have an instance of callAI that is only used to generate demo data, always use the same calls that are triggered by user actions in the app.\n`
|
|
224
179
|
: "";
|
|
225
|
-
const
|
|
226
|
-
You are an AI assistant tasked with creating React components. You should create components that:
|
|
227
|
-
- Use modern React practices and follow the rules of hooks
|
|
228
|
-
- Don't use any TypeScript, just use JavaScript
|
|
229
|
-
- Use Tailwind CSS for mobile-first accessible styling
|
|
230
|
-
|
|
231
|
-
- For dynamic components, like autocomplete, don't use external libraries, implement your own
|
|
232
|
-
- Avoid using external libraries unless they are essential for the component to function
|
|
233
|
-
- Always import the libraries you need at the top of the file
|
|
234
|
-
- Use Fireproof for data persistence
|
|
235
|
-
- Use
|
|
236
|
-
- For file uploads use drag and drop and store using the
|
|
237
|
-
- Don't try to generate png or base64 data, use placeholder image APIs instead, like https://picsum.photos/400 where 400 is the square size
|
|
238
|
-
- Consider and potentially reuse/extend code from previous responses if relevant
|
|
239
|
-
- Always output the full component code, keep the explanation short and concise
|
|
240
|
-
- Never also output a small snippet to change, just the full component code
|
|
241
|
-
- Keep your component file as short as possible for fast updates
|
|
242
|
-
- Keep the database name stable as you edit the code
|
|
243
|
-
- The system can send you crash reports, fix them by simplifying the affected code
|
|
244
|
-
- List data items on the main page of your app so users don't have to hunt for them
|
|
245
|
-
- If you save data, make sure it is browseable in the app, eg lists should be clickable for more details
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
Provide a title and brief explanation followed by the component code. The component should demonstrate proper Fireproof integration with real-time updates and proper data persistence.
|
|
261
|
-
|
|
262
|
-
Begin the component with the import statements. Use react and the following libraries:
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
import React, { ... } from "react"${generateImportStatements(chosenLlms)}
|
|
266
|
-
|
|
267
|
-
// other imports only when requested
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
180
|
+
const systemPromptLines = [
|
|
181
|
+
"You are an AI assistant tasked with creating React components. You should create components that:",
|
|
182
|
+
"- Use modern React practices and follow the rules of hooks",
|
|
183
|
+
"- Don't use any TypeScript, just use JavaScript",
|
|
184
|
+
"- Use Tailwind CSS for mobile-first accessible styling",
|
|
185
|
+
`- Don't use words from the style prompt in your copy: ${stylePrompt}`,
|
|
186
|
+
"- For dynamic components, like autocomplete, don't use external libraries, implement your own",
|
|
187
|
+
"- Avoid using external libraries unless they are essential for the component to function",
|
|
188
|
+
"- Always import the libraries you need at the top of the file",
|
|
189
|
+
"- Use Fireproof for data persistence",
|
|
190
|
+
"- Use `callAI` to fetch AI (set `stream: true` to enable streaming), use Structured JSON Outputs like this: `callAI(prompt, { schema: { properties: { todos: { type: 'array', items: { type: 'string' } } } } })` and save final responses as individual Fireproof documents.",
|
|
191
|
+
"- For file uploads use drag and drop and store using the `doc._files` API",
|
|
192
|
+
"- Don't try to generate png or base64 data, use placeholder image APIs instead, like https://picsum.photos/400 where 400 is the square size",
|
|
193
|
+
"- Consider and potentially reuse/extend code from previous responses if relevant",
|
|
194
|
+
"- Always output the full component code, keep the explanation short and concise",
|
|
195
|
+
"- Never also output a small snippet to change, just the full component code",
|
|
196
|
+
"- Keep your component file as short as possible for fast updates",
|
|
197
|
+
"- Keep the database name stable as you edit the code",
|
|
198
|
+
"- The system can send you crash reports, fix them by simplifying the affected code",
|
|
199
|
+
"- List data items on the main page of your app so users don't have to hunt for them",
|
|
200
|
+
"- If you save data, make sure it is browseable in the app, eg lists should be clickable for more details",
|
|
201
|
+
demoDataLines,
|
|
202
|
+
];
|
|
203
|
+
const systemPrompt = [
|
|
204
|
+
systemPromptLines.join("\n"),
|
|
205
|
+
"",
|
|
206
|
+
concatenatedLlmsTxt,
|
|
207
|
+
"",
|
|
208
|
+
"## ImgGen Component",
|
|
209
|
+
"",
|
|
210
|
+
"You should use this component in all cases where you need to generate or edit images. It is a React component that provides a UI for image generation and editing. Make sure to pass the database prop to the component. If you generate images, use a live query to list them (with type 'image') in the UI. The best usage is to save a document with a string field called `prompt` (which is sent to the generator) and an optional `doc._files.original` image and pass the `doc._id` to the component via the `_id` prop. It will handle the rest.",
|
|
211
|
+
"",
|
|
212
|
+
...(userPrompt ? [userPrompt, ""] : []),
|
|
213
|
+
"IMPORTANT: You are working in one JavaScript file, use tailwind classes for styling. Remember to use brackets like bg-[#242424] for custom colors.",
|
|
214
|
+
"",
|
|
215
|
+
"Provide a title and brief explanation followed by the component code. The component should demonstrate proper Fireproof integration with real-time updates and proper data persistence.",
|
|
216
|
+
"",
|
|
217
|
+
"Begin the component with the import statements. Use react and the following libraries:",
|
|
218
|
+
"",
|
|
219
|
+
"```js",
|
|
220
|
+
`import React, { ... } from "react"${generateImportStatements(chosenLlms)}`,
|
|
221
|
+
"",
|
|
222
|
+
"// other imports only when requested",
|
|
223
|
+
"```",
|
|
224
|
+
"",
|
|
225
|
+
].join("\n");
|
|
271
226
|
return {
|
|
272
227
|
systemPrompt,
|
|
273
228
|
dependencies: selectedNames,
|
|
@@ -276,11 +231,6 @@ import React, { ... } from "react"${generateImportStatements(chosenLlms)}
|
|
|
276
231
|
};
|
|
277
232
|
}
|
|
278
233
|
export const RESPONSE_FORMAT = {
|
|
279
|
-
structure: [
|
|
280
|
-
"Brief explanation",
|
|
281
|
-
"Component code with proper Fireproof integration",
|
|
282
|
-
"Real-time updates",
|
|
283
|
-
"Data persistence",
|
|
284
|
-
],
|
|
234
|
+
structure: ["Brief explanation", "Component code with proper Fireproof integration", "Real-time updates", "Data persistence"],
|
|
285
235
|
};
|
|
286
236
|
//# sourceMappingURL=prompts.js.map
|
package/prompts.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompts.js","sourceRoot":"","sources":["../jsr/prompts.ts"],"names":[],"mappings":"
|
|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AqC,wBAAwB,CAAC,UAAU,CAAC,EAAE;QAC3E,EAAE;QACF,sCAAsC;QACtC,KAAK;QACL,EAAE;KACH,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAEb,OAAO;QACL,YAAY;QACZ,YAAY,EAAE,aAAa;QAC3B,QAAQ,EAAE,eAAe;QACzB,KAAK;KACN,CAAC;AAAA,CACH;AAGD,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,SAAS,EAAE,CAAC,mBAAmB,EAAE,kDAAkD,EAAE,mBAAmB,EAAE,kBAAkB,CAAC;CAC9H,CAAC"}
|
package/segment-parser.js
CHANGED
|
@@ -5,24 +5,16 @@ export function parseContent(text) {
|
|
|
5
5
|
const depsFormat3 = text.match(/^({"dependencies":\s*{(?:"[^"]+"\s*:\s*"[^"]+"(?:,\s*)?)+}})/);
|
|
6
6
|
const depsFormat4 = text.match(/^({"dependencies":\s*{[\s\S]*?^}})/m);
|
|
7
7
|
if (depsFormat1 && depsFormat1[1]) {
|
|
8
|
-
text = text
|
|
9
|
-
.substring(text.indexOf(depsFormat1[1]) + depsFormat1[1].length)
|
|
10
|
-
.trim();
|
|
8
|
+
text = text.substring(text.indexOf(depsFormat1[1]) + depsFormat1[1].length).trim();
|
|
11
9
|
}
|
|
12
10
|
else if (depsFormat2 && depsFormat2[1]) {
|
|
13
|
-
text = text
|
|
14
|
-
.substring(text.indexOf(depsFormat2[1]) + depsFormat2[1].length)
|
|
15
|
-
.trim();
|
|
11
|
+
text = text.substring(text.indexOf(depsFormat2[1]) + depsFormat2[1].length).trim();
|
|
16
12
|
}
|
|
17
13
|
else if (depsFormat3 && depsFormat3[1]) {
|
|
18
|
-
text = text
|
|
19
|
-
.substring(text.indexOf(depsFormat3[1]) + depsFormat3[1].length)
|
|
20
|
-
.trim();
|
|
14
|
+
text = text.substring(text.indexOf(depsFormat3[1]) + depsFormat3[1].length).trim();
|
|
21
15
|
}
|
|
22
16
|
else if (depsFormat4 && depsFormat4[1]) {
|
|
23
|
-
text = text
|
|
24
|
-
.substring(text.indexOf(depsFormat4[1]) + depsFormat4[1].length)
|
|
25
|
-
.trim();
|
|
17
|
+
text = text.substring(text.indexOf(depsFormat4[1]) + depsFormat4[1].length).trim();
|
|
26
18
|
}
|
|
27
19
|
const codeBlockRegex = /(?:^|\n)[ \t]*```(?:js|jsx|javascript|)[ \t]*\n([\s\S]*?)(?:^|\n)[ \t]*```[ \t]*(?:\n|$)/g;
|
|
28
20
|
const codeBlocks = [];
|
|
@@ -41,8 +33,7 @@ export function parseContent(text) {
|
|
|
41
33
|
});
|
|
42
34
|
}
|
|
43
35
|
const incompleteCodeBlockMatch = text.match(/(?:^|\n)[ \t]*```(?:js|jsx|javascript|)[ \t]*\n([\s\S]*)$/s);
|
|
44
|
-
if (incompleteCodeBlockMatch &&
|
|
45
|
-
incompleteCodeBlockMatch.index !== undefined) {
|
|
36
|
+
if (incompleteCodeBlockMatch && incompleteCodeBlockMatch.index !== undefined) {
|
|
46
37
|
const startIdx = incompleteCodeBlockMatch.index;
|
|
47
38
|
const isDuplicate = codeBlocks.some((block) => block.startIdx === startIdx);
|
|
48
39
|
if (!isDuplicate) {
|
|
@@ -84,8 +75,7 @@ export function parseContent(text) {
|
|
|
84
75
|
beforeContent += text.substring(currentPos, block.startIdx);
|
|
85
76
|
break;
|
|
86
77
|
}
|
|
87
|
-
else if (block.startIdx >= currentPos &&
|
|
88
|
-
block.endIdx <= longestBlock.startIdx) {
|
|
78
|
+
else if (block.startIdx >= currentPos && block.endIdx <= longestBlock.startIdx) {
|
|
89
79
|
beforeContent += text.substring(currentPos, block.startIdx);
|
|
90
80
|
beforeContent += block.fullBlock;
|
|
91
81
|
currentPos = block.endIdx;
|
package/segment-parser.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"segment-parser.js","sourceRoot":"","sources":["../jsr/segment-parser.ts"],"names":[],"mappings":"AAMA,MAAM,UAAU,YAAY,CAAC,IAAY,EAEvC;IACA,MAAM,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AI,EAAE,SAAS;QACf,MAAM,EACJ,+8BAA+8B;KACl9B;IACD;QACE,IAAI,EAAE,WAAW;QACjB,MAAM,EAAE,uBAAuB;KAChC;IACD;QACE,IAAI,EAAE,YAAY;QAClB,MAAM,EAAE,sBAAsB;KAC/B;IACD;QACE,IAAI,EAAE,YAAY;QAClB,MAAM,EAAE,mBAAmB;KAC5B;IACD;QACE,IAAI,EAAE,cAAc;QACpB,MAAM,EAAE,mBAAmB;KAC5B;IACD;QACE,IAAI,EAAE,aAAa;QACnB,MAAM,EAAE,kBAAkB;KAC3B;IACD;QACE,IAAI,EAAE,SAAS;QACf,MAAM,EAAE,qBAAqB;KAC9B;IACD;QACE,IAAI,EAAE,YAAY;QAClB,MAAM,EAAE,0BAA0B;KACnC;IACD;QACE,IAAI,EAAE,cAAc;QACpB,MAAM,EAAE,kBAAkB;KAC3B;IACD;QACE,IAAI,EAAE,UAAU;QAChB,MAAM,EACJ,orCAAorC;KACvrC;CACF,CAAC;AAGF,MAAM,CAAC,MAAM,kBAAkB,GAAG,eAAwB,CAAC;AAG3D,MAAM,WAAW,GAAG,IAAI,GAAG,EAAuB,CAAC;AACnD,KAAK,MAAM,CAAC,IAAI,YAAY,EAAE,CAAC;IAC7B,IAAI,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC;QAC5B,MAAM,IAAI,KAAK,
|
|
1
|
+
{"version":3,"file":"style-prompts.js","sourceRoot":"","sources":["../jsr/style-prompts.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,MAAM,YAAY,GAAkB;IAIzC;QACE,IAAI,EAAE,eAAe;QACrB,MAAM,EACJ,wqCAAgqC;KACnqC;IACD;QACE,IAAI,EAAE,SAAS;QACf,MAAM,EACJ,+8BAA+8B;KACl9B;IACD;QACE,IAAI,EAAE,WAAW;QACjB,MAAM,EAAE,uBAAuB;KAChC;IACD;QACE,IAAI,EAAE,YAAY;QAClB,MAAM,EAAE,sBAAsB;KAC/B;IACD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MAAM,CAAC;AAAA,CACrB,CAAC,EAAE,CAAC"}
|
package/txt-docs.ts-off
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { CoerceURI, ResolveOnce } from "@adviser/cement";
|
|
2
|
+
// import { loadDocs } from "./load-docs.js";
|
|
3
|
+
|
|
4
|
+
// TODO: Replace loadDocs with loadAsset for better cement integration
|
|
5
|
+
|
|
6
|
+
export interface TxtDoc {
|
|
7
|
+
readonly name: string;
|
|
8
|
+
readonly txt: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const files = ["callai.txt", "fireproof.txt", "image-gen.txt", "web-audio.txt", "d3.md", "three-js.md"];
|
|
12
|
+
|
|
13
|
+
// // Lazy loading per file instead of eager loading all files
|
|
14
|
+
// const fileLoaders = new Map<string, ResolveOnce<TxtDoc | undefined>>();
|
|
15
|
+
|
|
16
|
+
// function getFileLoader(file: string, fallBackUrl: CoerceURI): ResolveOnce<TxtDoc | undefined> {
|
|
17
|
+
// const key = `${fallBackUrl?.toString() || ""}:${file}`;
|
|
18
|
+
// if (!fileLoaders.has(key)) {
|
|
19
|
+
// fileLoaders.set(key, new ResolveOnce<TxtDoc | undefined>());
|
|
20
|
+
// }
|
|
21
|
+
// const loader = fileLoaders.get(key);
|
|
22
|
+
// if (!loader) {
|
|
23
|
+
// throw new Error(`File loader not found for key: ${key}`);
|
|
24
|
+
// }
|
|
25
|
+
// return loader;
|
|
26
|
+
// }
|
|
27
|
+
|
|
28
|
+
// async function loadTxtDoc(file: string, fallBackUrl: CoerceURI): Promise<TxtDoc | undefined> {
|
|
29
|
+
// const loader = getFileLoader(file, fallBackUrl);
|
|
30
|
+
// return loader.once(async () => {
|
|
31
|
+
// const rAsset = await loadDocs(file, fallBackUrl);
|
|
32
|
+
// if (rAsset.isErr()) {
|
|
33
|
+
// console.error(`Failed to load asset ${file}: ${rAsset.Err()}`);
|
|
34
|
+
// return undefined;
|
|
35
|
+
// }
|
|
36
|
+
// return { name: file, txt: rAsset.Ok() };
|
|
37
|
+
// });
|
|
38
|
+
// }
|
|
39
|
+
|
|
40
|
+
// export async function getTexts(name: string, fallBackUrl: CoerceURI): Promise<string | undefined> {
|
|
41
|
+
// name = name.toLocaleLowerCase().trim();
|
|
42
|
+
|
|
43
|
+
// // Try exact match first by looking for the file directly
|
|
44
|
+
// for (const file of files) {
|
|
45
|
+
// const fileName =
|
|
46
|
+
// file
|
|
47
|
+
// .split("/")
|
|
48
|
+
// .pop()
|
|
49
|
+
// ?.toLowerCase()
|
|
50
|
+
// .replace(/\.(txt|md)$/, "") || "";
|
|
51
|
+
// if (fileName === name) {
|
|
52
|
+
// const doc = await loadTxtDoc(file, fallBackUrl);
|
|
53
|
+
// return doc?.txt;
|
|
54
|
+
// }
|
|
55
|
+
// }
|
|
56
|
+
|
|
57
|
+
// return undefined;
|
|
58
|
+
// }
|
package/load-docs.d.ts
DELETED
package/load-docs.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Result } from "@adviser/cement";
|
|
2
|
-
import { joinUrlParts } from "call-ai";
|
|
3
|
-
export async function loadDocs(localPath, baseUrl) {
|
|
4
|
-
const url = joinUrlParts(baseUrl?.toString() || "", localPath);
|
|
5
|
-
try {
|
|
6
|
-
const response = await fetch(url);
|
|
7
|
-
if (!response.ok) {
|
|
8
|
-
return Result.Err(`Failed to fetch ${url}: ${response.status} ${response.statusText}`);
|
|
9
|
-
}
|
|
10
|
-
const text = await response.text();
|
|
11
|
-
return Result.Ok(text);
|
|
12
|
-
}
|
|
13
|
-
catch (error) {
|
|
14
|
-
return Result.Err(`Error fetching ${url}: ${error}`);
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
//# sourceMappingURL=load-docs.js.map
|
package/load-docs.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"load-docs.js","sourceRoot":"","sources":["../jsr/load-docs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,MAAM,CAAC,KAAK,UAAU,QAAQ,CAC5B,SAAiB,EACjB,OAAkB,EACO;IACzB,MAAM,GAAG,GAAG,YAAY,CAAC,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,SAAS,CAAC,CAAC;IAC/D,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,CAAC,CAAC;QAClC,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;YACjB,OAAO,MAAM,CAAC,GAAG,CACf,mBAAmB,GAAG,KAAK,QAAQ,CAAC,MAAM,IAAI,QAAQ,CAAC,UAAU,EAAE,CACpE,CAAC;QACJ,CAAC;QACD,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;QACnC,OAAO,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC;IACzB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,MAAM,CAAC,GAAG,CAAC,kBAAkB,GAAG,KAAK,KAAK,EAAE,CAAC,CAAC;IACvD,CAAC;AAAA,CACF"}
|
package/txt-docs.d.ts
DELETED
package/txt-docs.js
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { ResolveOnce } from "@adviser/cement";
|
|
2
|
-
import { loadDocs } from "./load-docs.js";
|
|
3
|
-
const files = [
|
|
4
|
-
"callai.txt",
|
|
5
|
-
"fireproof.txt",
|
|
6
|
-
"image-gen.txt",
|
|
7
|
-
"web-audio.txt",
|
|
8
|
-
"d3.md",
|
|
9
|
-
"three-js.md",
|
|
10
|
-
];
|
|
11
|
-
const fileLoaders = new Map();
|
|
12
|
-
function getFileLoader(file, fallBackUrl) {
|
|
13
|
-
const key = `${fallBackUrl?.toString() || ""}:${file}`;
|
|
14
|
-
if (!fileLoaders.has(key)) {
|
|
15
|
-
fileLoaders.set(key, new ResolveOnce());
|
|
16
|
-
}
|
|
17
|
-
const loader = fileLoaders.get(key);
|
|
18
|
-
if (!loader) {
|
|
19
|
-
throw new Error(`File loader not found for key: ${key}`);
|
|
20
|
-
}
|
|
21
|
-
return loader;
|
|
22
|
-
}
|
|
23
|
-
async function loadTxtDoc(file, fallBackUrl) {
|
|
24
|
-
const loader = getFileLoader(file, fallBackUrl);
|
|
25
|
-
return loader.once(async () => {
|
|
26
|
-
const rAsset = await loadDocs(file, fallBackUrl);
|
|
27
|
-
if (rAsset.isErr()) {
|
|
28
|
-
console.error(`Failed to load asset ${file}: ${rAsset.Err()}`);
|
|
29
|
-
return undefined;
|
|
30
|
-
}
|
|
31
|
-
return { name: file, txt: rAsset.Ok() };
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
export async function getTexts(name, fallBackUrl) {
|
|
35
|
-
name = name.toLocaleLowerCase().trim();
|
|
36
|
-
for (const file of files) {
|
|
37
|
-
const fileName = file
|
|
38
|
-
.split("/")
|
|
39
|
-
.pop()
|
|
40
|
-
?.toLowerCase()
|
|
41
|
-
.replace(/\.(txt|md)$/, "") || "";
|
|
42
|
-
if (fileName === name) {
|
|
43
|
-
const doc = await loadTxtDoc(file, fallBackUrl);
|
|
44
|
-
return doc?.txt;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
return undefined;
|
|
48
|
-
}
|
|
49
|
-
//# sourceMappingURL=txt-docs.js.map
|
package/txt-docs.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"txt-docs.js","sourceRoot":"","sources":["../jsr/txt-docs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAS1C,MAAM,KAAK,GAAG;IACZ,YAAY;IACZ,eAAe;IACf,eAAe;IACf,eAAe;IACf,OAAO;IACP,aAAa;CACd,CAAC;AAGF,MAAM,WAAW,GAAG,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