fix(web): annotate group replies with sender
This commit is contained in:
@@ -15,6 +15,7 @@ import { applyTemplate, type TemplateContext } from "./templating.js";
|
||||
import {
|
||||
formatToolAggregate,
|
||||
shortenMeta,
|
||||
shortenPath,
|
||||
TOOL_RESULT_FLUSH_COUNT,
|
||||
TOOL_RESULT_DEBOUNCE_MS,
|
||||
} from "./tool-meta.js";
|
||||
@@ -439,7 +440,7 @@ export async function runCommandReply(
|
||||
const textBlocks = Array.isArray(msg.content)
|
||||
? (msg.content as Array<{ type?: string; text?: string }>)
|
||||
.filter((c) => c?.type === "text" && typeof c.text === "string")
|
||||
.map((c) => c.text.trim())
|
||||
.map((c) => (c.text ?? "").trim())
|
||||
.filter(Boolean)
|
||||
: [];
|
||||
if (textBlocks.length === 0) return;
|
||||
|
||||
@@ -26,7 +26,6 @@ import {
|
||||
} from "./templating.js";
|
||||
import { isAudio, transcribeInboundAudio } from "./transcription.js";
|
||||
import type { GetReplyOptions, ReplyPayload } from "./types.js";
|
||||
import { triggerWarelayRestart } from "../infra/restart.js";
|
||||
|
||||
export type { GetReplyOptions, ReplyPayload } from "./types.js";
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
export const TOOL_RESULT_DEBOUNCE_MS = 500;
|
||||
export const TOOL_RESULT_FLUSH_COUNT = 5;
|
||||
|
||||
function shortenPath(p: string): string {
|
||||
export function shortenPath(p: string): string {
|
||||
const home = process.env.HOME;
|
||||
if (home && (p === home || p.startsWith(`${home}/`)))
|
||||
return p.replace(home, "~");
|
||||
|
||||
Reference in New Issue
Block a user