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