mirror of
https://github.com/dograh-hq/dograh.git
synced 2026-07-01 08:59:46 +02:00
feat: add chat based testing for voice agent (#308)
* feat: add backend foundations * feat: add text chat UI * chore: simplify the reload behaviour * fix: fix upgrade banner to be triggered after package upload * feat: simplify TesterPanel design * chore: fix formatting and generate client * chore: fix tracing for text chat mode * fix: fix revert and edit CTA * refactor: refactor TesterPanel into smaller components * feat: enable runtime transition of nodes * fix: fix review comments
This commit is contained in:
parent
67479e98fd
commit
d97d1d72cd
96 changed files with 7630 additions and 1684 deletions
21
ui/src/components/workflow/conversation/utils.ts
Normal file
21
ui/src/components/workflow/conversation/utils.ts
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
import type { ConversationItem } from "./types";
|
||||
|
||||
export function formatConversationValue(value: unknown) {
|
||||
if (value == null) {
|
||||
return "None";
|
||||
}
|
||||
if (typeof value === "string") {
|
||||
return value;
|
||||
}
|
||||
try {
|
||||
return JSON.stringify(value, null, 2);
|
||||
} catch {
|
||||
return String(value);
|
||||
}
|
||||
}
|
||||
|
||||
export function countConversationMessages(items: ConversationItem[]) {
|
||||
return items.filter(
|
||||
(item) => item.kind === "message" && item.tone !== "muted",
|
||||
).length;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue