mirror of
https://github.com/open-webui/computer.git
synced 2026-12-05 11:07:56 -05:00
refac
This commit is contained in:
1 parent
2aa1630aee
commit
3133d4301a
5 files changed
+45
-47
No files matched your search
@@ -1,9 +0,0 @@
|
||||
<script lang="ts">
|
||||
import MarkdownRenderer from '$lib/components/markdown/MarkdownRenderer.svelte';
|
||||
|
||||
let { content }: { content: string } = $props();
|
||||
</script>
|
||||
|
||||
<div class="h-full overflow-y-auto px-6 py-5">
|
||||
<div class="mx-auto max-w-3xl"><MarkdownRenderer {content} /></div>
|
||||
</div>
|
||||
@@ -8,7 +8,7 @@
|
||||
import MessageTimestamp from './MessageTimestamp.svelte';
|
||||
import ReasoningCollapsible from './ReasoningCollapsible.svelte';
|
||||
import ToolCallCollapsible from './ToolCallCollapsible.svelte';
|
||||
import { currentWorkspace, openArtifactTab, openFileTab } from '$lib/stores';
|
||||
import { currentWorkspace, openFileTab } from '$lib/stores';
|
||||
import { ttsConfigured, ttsEnabled } from '$lib/stores/audio';
|
||||
import { tooltip } from '$lib/tooltip';
|
||||
import { fileIconName } from '$lib/utils/fileIcon';
|
||||
@@ -159,7 +159,12 @@
|
||||
}
|
||||
|
||||
function openArtifact(artifact: any) {
|
||||
openArtifactTab(artifact.title || 'Artifact', artifact.content || '');
|
||||
const workspace = get(currentWorkspace);
|
||||
const path =
|
||||
workspace && artifact.path
|
||||
? `${workspace.path.replace(/\/$/, '')}/${artifact.path}`
|
||||
: artifact.path;
|
||||
if (path) openFileTab(path);
|
||||
}
|
||||
|
||||
/** Human-readable label for a tool call */
|
||||
|
||||
Reference in new issue
Block a user