feat(ui): code blocks and chat messages from shadcn-vue's code-block, message and bubble
This commit is contained in:
1 parent
d876c150eb
commit
63adbc71ef
67 files changed
+1770
-310
No files matched your search
@@ -1,7 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import { computed } from "vue";
|
||||
|
||||
import HighlightedJson from "@/base/HighlightedJson.vue";
|
||||
import CodeView from "@/base/CodeView.vue";
|
||||
import { prettyPrint } from "./capture-payload";
|
||||
|
||||
/**
|
||||
@@ -20,15 +20,7 @@ const text = computed(() => prettyPrint(props.raw));
|
||||
>
|
||||
{{ label }}
|
||||
</h3>
|
||||
<!--
|
||||
Wrap rather than scroll sideways: a captured payload is mostly long
|
||||
unbroken tokens (URLs, hashes, base64), and one of those on a single line
|
||||
would push the panel's contents past its edge instead of being read.
|
||||
-->
|
||||
<p v-if="!text" class="text-sm text-fg-muted">(empty)</p>
|
||||
<pre
|
||||
v-else
|
||||
class="rounded-sm border border-border-strong bg-muted p-3 font-mono text-xs whitespace-pre-wrap wrap-break-word"
|
||||
><HighlightedJson :text="text" /></pre>
|
||||
<CodeView v-else :code="text" lang="json" />
|
||||
</section>
|
||||
</template>
|
||||
Reference in new issue
Block a user