@dorokuma/herdsman-pi 0.11.5 → 0.11.6

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/index.ts +1 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dorokuma/herdsman-pi",
3
- "version": "0.11.5",
3
+ "version": "0.11.6",
4
4
  "description": "Pi extension bridge for Herdsman agent history. Forked from @ryonakae/herdsman.",
5
5
  "type": "module",
6
6
  "keywords": [
package/src/index.ts CHANGED
@@ -1245,7 +1245,7 @@ export function formatHiddenAgentUpdates(events: AgentEventWireRecord[]): string
1245
1245
  });
1246
1246
  return [
1247
1247
  `- ${event.type} ${identity} ${event.paneId ?? "unknown"}`,
1248
- ` last assistant: ${oneLine(sanitizeText(history.lastAssistantMessage?.text ?? "").text)}`,
1248
+ ` last assistant: ${sanitizeAndCleanContextText(history.lastAssistantMessage?.text ?? "")}`,
1249
1249
  ` event: ${event.id}`,
1250
1250
  ].join("\n");
1251
1251
  }),
@@ -1306,10 +1306,6 @@ function record(value: unknown): Record<string, unknown> {
1306
1306
  return typeof value === "object" && value !== null ? (value as Record<string, unknown>) : {};
1307
1307
  }
1308
1308
 
1309
- function oneLine(value: string): string {
1310
- return value.replace(/\s+/g, " ");
1311
- }
1312
-
1313
1309
  function cleanContextText(value: string): string {
1314
1310
  return stripVTControlCharacters(value)
1315
1311
  .replace(