mirror of
https://github.com/open-webui/open-webui
synced 2025-03-22 13:07:07 +00:00
refac: code_execution.uuid -> id
convention
This commit is contained in:
parent
adb1bfcaa8
commit
55f14e37ea
@ -176,14 +176,14 @@
|
||||
}
|
||||
} else if (type === 'citation') {
|
||||
if (data?.type === 'code_execution') {
|
||||
// Code execution; update existing code execution by UUID,
|
||||
// Code execution; update existing code execution by ID,
|
||||
// otherwise append.
|
||||
if (!message?.code_executions) {
|
||||
message.code_executions = [];
|
||||
}
|
||||
let is_update = false;
|
||||
for (let i = 0; i < message.code_executions.length; i++) {
|
||||
if (message.code_executions[i].uuid === data.uuid) {
|
||||
if (message.code_executions[i].id === data.id) {
|
||||
message.code_executions[i] = data;
|
||||
is_update = true;
|
||||
break;
|
||||
|
@ -57,7 +57,7 @@
|
||||
</div>
|
||||
|
||||
<CodeBlock
|
||||
id="codeexec-{code_execution?.uuid}-code"
|
||||
id="codeexec-{code_execution?.id}-code"
|
||||
lang={code_execution?.language}
|
||||
code={code_execution?.code}
|
||||
allow_execution={false}
|
||||
@ -71,7 +71,7 @@
|
||||
</div>
|
||||
|
||||
<CodeBlock
|
||||
id="codeexec-{code_execution?.uuid}-error"
|
||||
id="codeexec-{code_execution?.id}-error"
|
||||
lang=""
|
||||
code={code_execution?.error}
|
||||
allow_execution={false}
|
||||
@ -86,7 +86,7 @@
|
||||
</div>
|
||||
|
||||
<CodeBlock
|
||||
id="codeexec-{code_execution?.uuid}-output"
|
||||
id="codeexec-{code_execution?.id}-output"
|
||||
lang=""
|
||||
code={code_execution?.output}
|
||||
allow_execution={false}
|
||||
|
@ -11,6 +11,7 @@
|
||||
let output = null;
|
||||
let files = [];
|
||||
let status = 'PENDING';
|
||||
|
||||
if (code_execution.result) {
|
||||
output = code_execution.result.output;
|
||||
if (code_execution.result.error) {
|
||||
@ -23,8 +24,9 @@
|
||||
files = code_execution.result.files;
|
||||
}
|
||||
}
|
||||
|
||||
acc.push({
|
||||
uuid: code_execution.uuid,
|
||||
id: code_execution.id,
|
||||
name: code_execution.name,
|
||||
code: code_execution.code,
|
||||
language: code_execution.language || '',
|
||||
|
Loading…
Reference in New Issue
Block a user