@oh-my-pi/pi-coding-agent 14.9.7 → 14.9.8

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.
@@ -17,8 +17,9 @@ export async function getTemplate(): Promise<string> {
17
17
  .replace(/\s*([{}:;,])\s*/g, "$1")
18
18
  .trim();
19
19
 
20
- // Inline everything
20
+ // Inline everything; use function replacements so `$'`, `$&`, `$$`, etc.
21
+ // inside the embedded CSS/JS are not interpreted as substitution patterns.
21
22
  return html
22
- .replace("<template-css/>", `<style>${minifiedCss}</style>`)
23
- .replace("<template-js/>", `<script>${js}</script>`);
23
+ .replace("<template-css/>", () => `<style>${minifiedCss}</style>`)
24
+ .replace("<template-js/>", () => `<script>${js}</script>`);
24
25
  }
@@ -22,6 +22,7 @@ type ReadToolResultDetails = {
22
22
  from?: string;
23
23
  to?: string;
24
24
  };
25
+ conflictCount?: number;
25
26
  };
26
27
 
27
28
  type ReadToolGroupOptions = {
@@ -41,6 +42,7 @@ type ReadEntry = {
41
42
  status: "pending" | "success" | "warning" | "error";
42
43
  correctedFrom?: string;
43
44
  contentText?: string;
45
+ conflictCount?: number;
44
46
  };
45
47
 
46
48
  /** Number of code lines to show in collapsed preview mode */
@@ -91,6 +93,9 @@ export class ReadToolGroupComponent extends Container implements ToolExecutionHa
91
93
  } else {
92
94
  entry.correctedFrom = undefined;
93
95
  }
96
+ const conflictCount =
97
+ typeof details?.conflictCount === "number" && details.conflictCount > 0 ? details.conflictCount : undefined;
98
+ entry.conflictCount = conflictCount;
94
99
  entry.status = result.isError ? "error" : suffixResolution ? "warning" : "success";
95
100
  // Store the text content for preview/expanded display
96
101
  const textContent = result.content?.find(c => c.type === "text")?.text;
@@ -212,6 +217,10 @@ export class ReadToolGroupComponent extends Container implements ToolExecutionHa
212
217
  if (entry.correctedFrom) {
213
218
  pathDisplay += theme.fg("dim", ` (corrected from ${shortenPath(entry.correctedFrom)})`);
214
219
  }
220
+ if (entry.conflictCount && entry.conflictCount > 0) {
221
+ const n = entry.conflictCount;
222
+ pathDisplay += ` ${theme.fg("warning", `(⚠ ${n} conflict${n === 1 ? "" : "s"})`)}`;
223
+ }
215
224
  return pathDisplay;
216
225
  }
217
226
 
@@ -18,6 +18,7 @@ The `read` tool is multi-purpose and more capable than it looks — inspects fil
18
18
  |`:50+150`|Read 150 lines starting at line 50|
19
19
  |`:20+1`|Read exactly one line|
20
20
  |`:raw`|Read verbatim text without anchors or summarization|
21
+ |`:conflicts`|Return a one-line-per-block index of every merge conflict in the file|
21
22
 
22
23
  # Filesystem
23
24
  - Reading a directory path returns a list of dirents.