Этап 4 / Волна 16: смысловая изоляция РБП и ОС, фиксы лайв-ответов и добивка экспорта
This commit is contained in:
@@ -41,7 +41,11 @@ function stringifyDebug(value: unknown): string {
|
||||
}
|
||||
}
|
||||
|
||||
function buildConversationExport(sessionId: string, conversation: AssistantConversationItem[]): string {
|
||||
function buildConversationExport(
|
||||
sessionId: string,
|
||||
conversation: AssistantConversationItem[],
|
||||
includeDebugPayload = false
|
||||
): string {
|
||||
const lines: string[] = [];
|
||||
lines.push("# Assistant conversation export");
|
||||
lines.push(`session_id: ${sessionId || "n/a"}`);
|
||||
@@ -61,7 +65,7 @@ function buildConversationExport(sessionId: string, conversation: AssistantConve
|
||||
lines.push(item.text || "(empty)");
|
||||
lines.push("");
|
||||
|
||||
if (item.role === "assistant" && item.debug) {
|
||||
if (includeDebugPayload && item.role === "assistant" && item.debug) {
|
||||
lines.push("### debug_payload_json");
|
||||
lines.push("```json");
|
||||
lines.push(stringifyDebug(item.debug));
|
||||
@@ -143,7 +147,8 @@ export function AssistantPanel({
|
||||
if (conversation.length === 0) {
|
||||
return;
|
||||
}
|
||||
const exportText = buildConversationExport(sessionId, conversation);
|
||||
// Copy full run context for diagnostics (including debug payload blocks).
|
||||
const exportText = buildConversationExport(sessionId, conversation, true);
|
||||
const copied = await copyTextToClipboard(exportText);
|
||||
setCopyState(copied ? "success" : "error");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user