@vercel/dream 0.3.2 → 0.3.3

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.
Files changed (2) hide show
  1. package/dist/dream.js +21 -1
  2. package/package.json +1 -1
package/dist/dream.js CHANGED
@@ -541,10 +541,30 @@ async function runSession(client, title, systemPrompt, verbose) {
541
541
  if (props.sessionID && props.sessionID !== sessionId) {
542
542
  continue;
543
543
  }
544
+ if (event.type === "message.part.delta") {
545
+ const { delta, field } = event.properties;
546
+ if (delta && field === "text") {
547
+ responseText += delta;
548
+ if (lastOutput === "tool") process.stdout.write("\n");
549
+ const indented = delta.replace(/\n/g, `
550
+ ${INDENT_SESSION}`);
551
+ process.stdout.write(
552
+ lastOutput !== "text" ? `${INDENT_SESSION}${dim(indented)}` : dim(indented)
553
+ );
554
+ lastOutput = "text";
555
+ }
556
+ }
544
557
  if (event.type === "message.part.updated") {
545
558
  const { part } = event.properties;
546
559
  const delta = event.properties.delta;
547
- if (verbose && !["text", "reasoning", "tool", "step-finish"].includes(part.type)) {
560
+ if (verbose && ![
561
+ "text",
562
+ "reasoning",
563
+ "tool",
564
+ "step-finish",
565
+ "step-start",
566
+ "patch"
567
+ ].includes(part.type)) {
548
568
  printSessionDim(
549
569
  `unhandled part type: ${part.type} ${JSON.stringify(part).slice(0, 200)}`
550
570
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/dream",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "description": "A CLI that runs OpenCode in a loop until specs are complete",
5
5
  "type": "module",
6
6
  "bin": {