@mindstudio-ai/remy 0.1.63 → 0.1.64
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/headless.js +14 -5
- package/dist/index.js +14 -5
- package/dist/prompt/static/team.md +1 -1
- package/package.json +1 -1
package/dist/headless.js
CHANGED
|
@@ -4856,6 +4856,9 @@ async function runTurn(params) {
|
|
|
4856
4856
|
let turnCacheCreation = 0;
|
|
4857
4857
|
let turnCacheRead = 0;
|
|
4858
4858
|
let turnLlmCalls = 0;
|
|
4859
|
+
let lastCallInputTokens = 0;
|
|
4860
|
+
let lastCallCacheCreation = 0;
|
|
4861
|
+
let lastCallCacheRead = 0;
|
|
4859
4862
|
while (true) {
|
|
4860
4863
|
let getOrCreateAccumulator2 = function(id, name) {
|
|
4861
4864
|
let acc = toolInputAccumulators.get(id);
|
|
@@ -5051,10 +5054,13 @@ async function runTurn(params) {
|
|
|
5051
5054
|
case "done":
|
|
5052
5055
|
stopReason = event.stopReason;
|
|
5053
5056
|
turnLlmCalls++;
|
|
5054
|
-
|
|
5057
|
+
lastCallInputTokens = event.usage.inputTokens;
|
|
5058
|
+
lastCallCacheCreation = event.usage.cacheCreationTokens ?? 0;
|
|
5059
|
+
lastCallCacheRead = event.usage.cacheReadTokens ?? 0;
|
|
5060
|
+
turnInputTokens += lastCallInputTokens;
|
|
5055
5061
|
turnOutputTokens += event.usage.outputTokens;
|
|
5056
|
-
turnCacheCreation +=
|
|
5057
|
-
turnCacheRead +=
|
|
5062
|
+
turnCacheCreation += lastCallCacheCreation;
|
|
5063
|
+
turnCacheRead += lastCallCacheRead;
|
|
5058
5064
|
break;
|
|
5059
5065
|
case "error":
|
|
5060
5066
|
onEvent({ type: "error", error: friendlyError(event.error) });
|
|
@@ -5099,7 +5105,10 @@ async function runTurn(params) {
|
|
|
5099
5105
|
outputTokens: turnOutputTokens,
|
|
5100
5106
|
cacheCreationTokens: turnCacheCreation || void 0,
|
|
5101
5107
|
cacheReadTokens: turnCacheRead || void 0,
|
|
5102
|
-
llmCalls: turnLlmCalls
|
|
5108
|
+
llmCalls: turnLlmCalls,
|
|
5109
|
+
lastCallInputTokens,
|
|
5110
|
+
lastCallCacheCreation: lastCallCacheCreation || void 0,
|
|
5111
|
+
lastCallCacheRead: lastCallCacheRead || void 0
|
|
5103
5112
|
}
|
|
5104
5113
|
});
|
|
5105
5114
|
return;
|
|
@@ -5550,7 +5559,7 @@ ${xmlParts}
|
|
|
5550
5559
|
sessionStats.totalOutputTokens += e.stats.outputTokens;
|
|
5551
5560
|
sessionStats.totalCacheCreationTokens += e.stats.cacheCreationTokens ?? 0;
|
|
5552
5561
|
sessionStats.totalCacheReadTokens += e.stats.cacheReadTokens ?? 0;
|
|
5553
|
-
sessionStats.lastContextSize = e.stats.inputTokens;
|
|
5562
|
+
sessionStats.lastContextSize = e.stats.lastCallInputTokens ?? e.stats.inputTokens;
|
|
5554
5563
|
}
|
|
5555
5564
|
sessionStats.messageCount = state.messages.length;
|
|
5556
5565
|
sessionStats.updatedAt = Date.now();
|
package/dist/index.js
CHANGED
|
@@ -4896,6 +4896,9 @@ async function runTurn(params) {
|
|
|
4896
4896
|
let turnCacheCreation = 0;
|
|
4897
4897
|
let turnCacheRead = 0;
|
|
4898
4898
|
let turnLlmCalls = 0;
|
|
4899
|
+
let lastCallInputTokens = 0;
|
|
4900
|
+
let lastCallCacheCreation = 0;
|
|
4901
|
+
let lastCallCacheRead = 0;
|
|
4899
4902
|
while (true) {
|
|
4900
4903
|
let getOrCreateAccumulator2 = function(id, name) {
|
|
4901
4904
|
let acc = toolInputAccumulators.get(id);
|
|
@@ -5091,10 +5094,13 @@ async function runTurn(params) {
|
|
|
5091
5094
|
case "done":
|
|
5092
5095
|
stopReason = event.stopReason;
|
|
5093
5096
|
turnLlmCalls++;
|
|
5094
|
-
|
|
5097
|
+
lastCallInputTokens = event.usage.inputTokens;
|
|
5098
|
+
lastCallCacheCreation = event.usage.cacheCreationTokens ?? 0;
|
|
5099
|
+
lastCallCacheRead = event.usage.cacheReadTokens ?? 0;
|
|
5100
|
+
turnInputTokens += lastCallInputTokens;
|
|
5095
5101
|
turnOutputTokens += event.usage.outputTokens;
|
|
5096
|
-
turnCacheCreation +=
|
|
5097
|
-
turnCacheRead +=
|
|
5102
|
+
turnCacheCreation += lastCallCacheCreation;
|
|
5103
|
+
turnCacheRead += lastCallCacheRead;
|
|
5098
5104
|
break;
|
|
5099
5105
|
case "error":
|
|
5100
5106
|
onEvent({ type: "error", error: friendlyError(event.error) });
|
|
@@ -5139,7 +5145,10 @@ async function runTurn(params) {
|
|
|
5139
5145
|
outputTokens: turnOutputTokens,
|
|
5140
5146
|
cacheCreationTokens: turnCacheCreation || void 0,
|
|
5141
5147
|
cacheReadTokens: turnCacheRead || void 0,
|
|
5142
|
-
llmCalls: turnLlmCalls
|
|
5148
|
+
llmCalls: turnLlmCalls,
|
|
5149
|
+
lastCallInputTokens,
|
|
5150
|
+
lastCallCacheCreation: lastCallCacheCreation || void 0,
|
|
5151
|
+
lastCallCacheRead: lastCallCacheRead || void 0
|
|
5143
5152
|
}
|
|
5144
5153
|
});
|
|
5145
5154
|
return;
|
|
@@ -6162,7 +6171,7 @@ ${xmlParts}
|
|
|
6162
6171
|
sessionStats.totalOutputTokens += e.stats.outputTokens;
|
|
6163
6172
|
sessionStats.totalCacheCreationTokens += e.stats.cacheCreationTokens ?? 0;
|
|
6164
6173
|
sessionStats.totalCacheReadTokens += e.stats.cacheReadTokens ?? 0;
|
|
6165
|
-
sessionStats.lastContextSize = e.stats.inputTokens;
|
|
6174
|
+
sessionStats.lastContextSize = e.stats.lastCallInputTokens ?? e.stats.inputTokens;
|
|
6166
6175
|
}
|
|
6167
6176
|
sessionStats.messageCount = state.messages.length;
|
|
6168
6177
|
sessionStats.updatedAt = Date.now();
|
|
@@ -10,7 +10,7 @@ Note: when you talk about the team to the user, refer to them by their name or a
|
|
|
10
10
|
|
|
11
11
|
Your designer. Consult for any visual decision — choosing a color, picking fonts, proposing a layout, soucing images, reviewing whether something looks good. Not just during intake or big design moments. If you're about to write CSS and you're not sure about a color, ask. If you just built a page and want a gut check, ask the designer to take a quick look. If the user says "I don't like how this looks," ask the design expert what to change rather than guessing yourself, or if they say "I want a different image," that's the designer's problem, not yours. The design expert can also source images if you need images for placeholders in scenarios - use it for bespoke, tailor-made images suited to the scenario instead of trying to guess stock photo URLs.
|
|
12
12
|
|
|
13
|
-
The design expert cannot see your conversation with the user, so include relevant context and requirements in your task. It can, however, see its past conversation with you, so you don't need to re-summarize everything it already knows. Just describe what's needed now and reference prior work naturally ("the user wants the colors warmer" is enough if the designer already built the palette). It can take screenshots of the app preview on its own — just ask it to review what's been built. It has curated font catalogs and design inspiration built in — don't ask it to research generic inspiration or look up "best X apps." Only point it at specific URLs if the user references a particular site, brand, or identity to match.
|
|
13
|
+
The design expert cannot see your conversation with the user, so include relevant context and requirements in your task. It can, however, see its past conversation with you, so you don't need to re-summarize everything it already knows. Just describe what's needed now and reference prior work naturally ("the user wants the colors warmer" is enough if the designer already built the palette). It can take screenshots of the app preview on its own (you need to give it paths to different pages if it needs them - it can't navigate by clicking) — just ask it to review what's been built. It has curated font catalogs and design inspiration built in — don't ask it to research generic inspiration or look up "best X apps." Only point it at specific URLs if the user references a particular site, brand, or identity to match.
|
|
14
14
|
|
|
15
15
|
The designer will return concrete resources: hex values, font names with CSS URLs, image URLs, layout descriptions, as well as specific techniques, CSS properties, and other values. Even if these don't seem important, it is critical that you note them in spec annotations and rely on them while building - the user cares about design almost above all else, and it is important to be extremely precise in your work.
|
|
16
16
|
|