@distlang/opencode-plugin 0.1.14 → 0.1.15

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/package.json +1 -1
  2. package/src/recorder.js +17 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@distlang/opencode-plugin",
3
- "version": "0.1.14",
3
+ "version": "0.1.15",
4
4
  "description": "OpenCode plugin for Distlang AI Debugger",
5
5
  "type": "module",
6
6
  "main": "./src/index.js",
package/src/recorder.js CHANGED
@@ -259,7 +259,7 @@ export function createRecorder({ project, directory, initialPrompt = "" }) {
259
259
  const interaction = observeUserPrompt(recorder, id, prompt, parseMessageTime(info, Date.now()), mode);
260
260
  addContextContributor(recorder, {
261
261
  category: "user_prompt",
262
- label: `User prompt ${interaction.index}`,
262
+ label: `User prompt from Interaction ${interaction.index}`,
263
263
  source: "opencode.message",
264
264
  text: prompt,
265
265
  });
@@ -331,7 +331,7 @@ export function createRecorder({ project, directory, initialPrompt = "" }) {
331
331
  addStep(recorder, targetInteraction, {
332
332
  kind: "llm_call",
333
333
  phase: targetInteraction.mode,
334
- title: summarizePrompt(assistantText, `Assistant response ${targetInteraction.index}`),
334
+ title: summarizePrompt(assistantText, `Model response for Interaction ${targetInteraction.index}`),
335
335
  started_at: new Date(existing.firstSeenAt).toISOString(),
336
336
  ended_at: new Date(now).toISOString(),
337
337
  duration_ms: Math.max(0, now - existing.firstSeenAt),
@@ -351,7 +351,7 @@ export function createRecorder({ project, directory, initialPrompt = "" }) {
351
351
  });
352
352
  addContextContributor(recorder, {
353
353
  category: "assistant_history",
354
- label: `Assistant response ${targetInteraction.index}`,
354
+ label: `Previous assistant response from Interaction ${targetInteraction.index}`,
355
355
  source: "opencode.message",
356
356
  text: assistantText,
357
357
  });
@@ -598,7 +598,20 @@ function estimateTokens(text) {
598
598
  }
599
599
 
600
600
  function detailCategoryLabel(category) {
601
- return String(category || "unknown").split("_").map((part) => part ? part[0].toUpperCase() + part.slice(1) : part).join(" ");
601
+ const labels = {
602
+ assistant_history: "Previous assistant messages",
603
+ file_context: "File/context snippets",
604
+ instructions: "Instructions",
605
+ system_event: "System event",
606
+ system_prompt: "System prompt",
607
+ tool_call: "Tool call",
608
+ tool_output: "Tool outputs",
609
+ user_prompt: "User prompts",
610
+ llm_call: "Model call",
611
+ file_edit: "File edit",
612
+ };
613
+ const normalized = String(category || "unknown");
614
+ return labels[normalized] || normalized.split("_").map((part) => part ? part[0].toUpperCase() + part.slice(1) : part).join(" ");
602
615
  }
603
616
 
604
617
  function safeDetailLabel(value, fallback) {