2025-12-27 14:50:32 +08:00
|
|
|
|
<template>
|
2026-04-13 18:06:25 +08:00
|
|
|
|
<div
|
|
|
|
|
|
class="tool-call-display"
|
|
|
|
|
|
:class="{ 'is-collapsed': !isExpanded, 'is-timeline': isTimeline }"
|
|
|
|
|
|
>
|
2025-12-27 14:50:32 +08:00
|
|
|
|
<!-- Header Slot -->
|
|
|
|
|
|
<div class="tool-header" @click="toggleExpand">
|
|
|
|
|
|
<!-- Fixed Status Icon -->
|
2026-03-29 15:43:58 +08:00
|
|
|
|
<span v-if="toolCall.status === 'success' || toolCall.tool_call_result">
|
|
|
|
|
|
<component v-if="toolIcon" :is="toolIcon" size="16" class="tool-loader tool-success" />
|
|
|
|
|
|
<CheckCircle v-else size="16" class="tool-loader tool-success" />
|
2025-12-27 14:50:32 +08:00
|
|
|
|
</span>
|
|
|
|
|
|
<span v-else-if="toolCall.status === 'error'">
|
2026-03-07 22:56:06 +08:00
|
|
|
|
<XCircle size="16" class="tool-loader tool-error" />
|
2025-12-27 14:50:32 +08:00
|
|
|
|
</span>
|
|
|
|
|
|
<span v-else>
|
|
|
|
|
|
<Loader size="16" class="tool-loader rotate tool-loading" />
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Content Area with Slots -->
|
|
|
|
|
|
<div class="tool-header-content">
|
2025-12-27 17:29:21 +08:00
|
|
|
|
<!-- Generic Header Slot (Overrides specific slots if provided) -->
|
|
|
|
|
|
<template v-if="$slots.header">
|
|
|
|
|
|
<slot name="header" :tool-call="toolCall" :tool-name="toolName"></slot>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Specific State Slots (Fallback) -->
|
|
|
|
|
|
<template v-else>
|
|
|
|
|
|
<slot
|
|
|
|
|
|
name="header-success"
|
|
|
|
|
|
v-if="toolCall.status === 'success' || toolCall.tool_call_result"
|
|
|
|
|
|
:tool-name="toolName"
|
|
|
|
|
|
:result-content="resultContent"
|
|
|
|
|
|
>
|
2026-01-15 06:01:34 +08:00
|
|
|
|
工具 <span class="tool-name">{{ toolName }}</span> 执行完成
|
2025-12-27 17:29:21 +08:00
|
|
|
|
</slot>
|
|
|
|
|
|
|
|
|
|
|
|
<slot
|
|
|
|
|
|
name="header-error"
|
|
|
|
|
|
v-else-if="toolCall.status === 'error'"
|
|
|
|
|
|
:tool-name="toolName"
|
|
|
|
|
|
:error-message="toolCall.error_message"
|
|
|
|
|
|
>
|
2026-01-15 06:01:34 +08:00
|
|
|
|
工具 <span class="tool-name">{{ toolName }}</span> 执行失败
|
2025-12-27 17:29:21 +08:00
|
|
|
|
<span v-if="toolCall.error_message">({{ toolCall.error_message }})</span>
|
|
|
|
|
|
</slot>
|
|
|
|
|
|
|
2026-01-15 06:01:34 +08:00
|
|
|
|
<slot name="header-running" v-else :tool-name="toolName">
|
2025-12-27 17:29:21 +08:00
|
|
|
|
正在调用工具: <span class="tool-name">{{ toolName }}</span>
|
|
|
|
|
|
</slot>
|
|
|
|
|
|
</template>
|
2025-12-27 14:50:32 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Fixed Expand Icon -->
|
|
|
|
|
|
<span class="tool-expand-icon">
|
|
|
|
|
|
<ChevronsDownUp v-if="isExpanded" size="14" />
|
|
|
|
|
|
<ChevronsUpDown v-else size="14" />
|
|
|
|
|
|
</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Content Area -->
|
|
|
|
|
|
<div class="tool-content" v-show="isExpanded">
|
|
|
|
|
|
<!-- Params Slot -->
|
|
|
|
|
|
<div class="tool-params" v-if="hasParams && !hideParams">
|
|
|
|
|
|
<slot name="params" :tool-call="toolCall" :args="formattedArgs">
|
|
|
|
|
|
<div class="tool-params-content">
|
|
|
|
|
|
<strong>参数: </strong>
|
|
|
|
|
|
<span>{{ formattedArgs }}</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</slot>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Result Slot -->
|
2026-04-26 18:51:38 +08:00
|
|
|
|
<div class="tool-result" style="opacity: 0.8" v-if="hasResult">
|
2025-12-27 14:50:32 +08:00
|
|
|
|
<slot name="result" :tool-call="toolCall" :result-content="resultContent">
|
|
|
|
|
|
<div class="tool-result-content" :data-tool-call-id="toolCall.id">
|
|
|
|
|
|
<!-- Default rendering -->
|
|
|
|
|
|
<div class="tool-result-renderer">
|
|
|
|
|
|
<div class="default-result">
|
|
|
|
|
|
<div class="default-content">
|
|
|
|
|
|
<pre>{{ formatResultData(parsedResultData) }}</pre>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</slot>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script setup>
|
2026-01-15 06:01:34 +08:00
|
|
|
|
import { ref, computed } from 'vue'
|
2026-03-29 15:43:58 +08:00
|
|
|
|
import { Loader, ChevronsUpDown, ChevronsDownUp, XCircle, CheckCircle } from 'lucide-vue-next'
|
2026-01-15 06:01:34 +08:00
|
|
|
|
import { useAgentStore } from '@/stores/agent'
|
|
|
|
|
|
import { storeToRefs } from 'pinia'
|
2026-03-26 12:13:51 +08:00
|
|
|
|
import { getToolCallId, getToolIcon } from './toolRegistry'
|
2025-12-27 14:50:32 +08:00
|
|
|
|
|
|
|
|
|
|
const props = defineProps({
|
|
|
|
|
|
toolCall: {
|
|
|
|
|
|
type: Object,
|
|
|
|
|
|
required: true
|
|
|
|
|
|
},
|
|
|
|
|
|
defaultExpanded: {
|
|
|
|
|
|
type: Boolean,
|
|
|
|
|
|
default: false
|
|
|
|
|
|
},
|
|
|
|
|
|
hideParams: {
|
|
|
|
|
|
type: Boolean,
|
|
|
|
|
|
default: false
|
2026-04-13 18:06:25 +08:00
|
|
|
|
},
|
|
|
|
|
|
appearance: {
|
|
|
|
|
|
type: String,
|
|
|
|
|
|
default: 'card'
|
2025-12-27 14:50:32 +08:00
|
|
|
|
}
|
2026-01-15 06:01:34 +08:00
|
|
|
|
})
|
2025-12-27 14:50:32 +08:00
|
|
|
|
|
2026-01-15 06:01:34 +08:00
|
|
|
|
const agentStore = useAgentStore()
|
|
|
|
|
|
const { availableTools } = storeToRefs(agentStore)
|
2025-12-27 14:50:32 +08:00
|
|
|
|
|
2026-01-15 06:01:34 +08:00
|
|
|
|
const isExpanded = ref(props.defaultExpanded)
|
2026-04-13 18:06:25 +08:00
|
|
|
|
const isTimeline = computed(() => props.appearance === 'timeline')
|
2025-12-27 14:50:32 +08:00
|
|
|
|
|
|
|
|
|
|
const toggleExpand = () => {
|
2026-01-15 06:01:34 +08:00
|
|
|
|
isExpanded.value = !isExpanded.value
|
|
|
|
|
|
}
|
2025-12-27 14:50:32 +08:00
|
|
|
|
|
|
|
|
|
|
// Tool Name Logic
|
2026-03-26 12:13:51 +08:00
|
|
|
|
const toolId = computed(() => getToolCallId(props.toolCall))
|
|
|
|
|
|
|
2025-12-27 14:50:32 +08:00
|
|
|
|
const toolName = computed(() => {
|
2026-01-15 06:01:34 +08:00
|
|
|
|
const toolsList = availableTools.value ? Object.values(availableTools.value) : []
|
2026-03-26 12:13:51 +08:00
|
|
|
|
const tool = toolsList.find((t) => t.id === toolId.value)
|
|
|
|
|
|
return tool ? tool.name : toolId.value
|
2026-01-15 06:01:34 +08:00
|
|
|
|
})
|
2025-12-27 14:50:32 +08:00
|
|
|
|
|
2026-03-07 22:56:06 +08:00
|
|
|
|
// Tool Icon Mapping
|
2026-03-26 12:13:51 +08:00
|
|
|
|
const toolIcon = computed(() => getToolIcon(toolId.value))
|
2026-03-07 22:56:06 +08:00
|
|
|
|
|
2025-12-27 14:50:32 +08:00
|
|
|
|
// Args Logic
|
|
|
|
|
|
const formattedArgs = computed(() => {
|
2026-01-15 06:01:34 +08:00
|
|
|
|
const args = props.toolCall.args ? props.toolCall.args : props.toolCall.function?.arguments
|
|
|
|
|
|
if (!args) return ''
|
2025-12-27 14:50:32 +08:00
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
if (typeof args === 'string' && args.trim().startsWith('{')) {
|
2026-01-15 06:01:34 +08:00
|
|
|
|
const parsed = JSON.parse(args)
|
|
|
|
|
|
return JSON.stringify(parsed, null, 2)
|
2025-12-27 14:50:32 +08:00
|
|
|
|
} else if (typeof args === 'object' && args !== null) {
|
2026-01-15 06:01:34 +08:00
|
|
|
|
return JSON.stringify(args, null, 2)
|
2025-12-27 14:50:32 +08:00
|
|
|
|
}
|
2026-03-26 12:13:51 +08:00
|
|
|
|
} catch {
|
2025-12-27 14:50:32 +08:00
|
|
|
|
// ignore
|
|
|
|
|
|
}
|
2026-01-15 06:01:34 +08:00
|
|
|
|
return args
|
|
|
|
|
|
})
|
2025-12-27 14:50:32 +08:00
|
|
|
|
|
|
|
|
|
|
const hasParams = computed(() => {
|
2026-01-15 06:01:34 +08:00
|
|
|
|
const argsStr = String(props.toolCall.args || props.toolCall.function?.arguments || '')
|
|
|
|
|
|
return argsStr.length > 2
|
|
|
|
|
|
})
|
2025-12-27 14:50:32 +08:00
|
|
|
|
|
|
|
|
|
|
// Result Logic
|
|
|
|
|
|
const resultContent = computed(() => {
|
2026-01-15 06:01:34 +08:00
|
|
|
|
return props.toolCall.tool_call_result?.content
|
|
|
|
|
|
})
|
2025-12-27 14:50:32 +08:00
|
|
|
|
|
|
|
|
|
|
const hasResult = computed(() => {
|
2026-01-15 06:01:34 +08:00
|
|
|
|
return !!resultContent.value
|
|
|
|
|
|
})
|
2025-12-27 14:50:32 +08:00
|
|
|
|
|
|
|
|
|
|
// Default Result Rendering Logic
|
|
|
|
|
|
const parsedResultData = computed(() => {
|
2026-01-15 06:01:34 +08:00
|
|
|
|
const content = resultContent.value
|
2025-12-27 14:50:32 +08:00
|
|
|
|
if (typeof content === 'string') {
|
|
|
|
|
|
try {
|
2026-01-15 06:01:34 +08:00
|
|
|
|
return JSON.parse(content)
|
2026-03-26 12:13:51 +08:00
|
|
|
|
} catch {
|
2026-01-15 06:01:34 +08:00
|
|
|
|
return content
|
2025-12-27 14:50:32 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2026-01-15 06:01:34 +08:00
|
|
|
|
return content
|
|
|
|
|
|
})
|
2025-12-27 14:50:32 +08:00
|
|
|
|
|
|
|
|
|
|
const formatResultData = (data) => {
|
|
|
|
|
|
if (typeof data === 'object') {
|
2026-01-15 06:01:34 +08:00
|
|
|
|
return JSON.stringify(data, null, 2)
|
2025-12-27 14:50:32 +08:00
|
|
|
|
}
|
2026-01-15 06:01:34 +08:00
|
|
|
|
return String(data)
|
|
|
|
|
|
}
|
2025-12-27 14:50:32 +08:00
|
|
|
|
|
|
|
|
|
|
// Auto expand if loading
|
|
|
|
|
|
// Note: In the original code, expansion was managed by parent.
|
|
|
|
|
|
// Here we might want to default to expanded if it's loading?
|
|
|
|
|
|
// Original: :class="{ 'is-collapsed': !expandedToolCalls.has(toolCall.id) }"
|
|
|
|
|
|
// And expandedToolCalls defaults to empty set.
|
|
|
|
|
|
// User didn't specify default behavior, but usually we want to see what's happening.
|
|
|
|
|
|
// Let's keep it simple for now, defaulting to closed unless specified.
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style lang="less" scoped>
|
|
|
|
|
|
.tool-call-display {
|
2026-04-13 18:06:25 +08:00
|
|
|
|
border: 1px solid var(--gray-100);
|
2025-12-27 14:50:32 +08:00
|
|
|
|
border-radius: 8px;
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
transition: all 0.2s ease;
|
2026-04-13 18:06:25 +08:00
|
|
|
|
margin-bottom: 8px;
|
2025-12-27 14:50:32 +08:00
|
|
|
|
|
|
|
|
|
|
&:last-child {
|
|
|
|
|
|
margin-bottom: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.tool-header {
|
2026-04-13 18:06:25 +08:00
|
|
|
|
padding: 6px 10px;
|
|
|
|
|
|
font-size: 13px;
|
2025-12-27 14:50:32 +08:00
|
|
|
|
font-weight: 500;
|
|
|
|
|
|
color: var(--gray-800);
|
2026-04-13 18:06:25 +08:00
|
|
|
|
border-bottom: 1px solid var(--gray-50);
|
2025-12-27 14:50:32 +08:00
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
gap: 8px;
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
user-select: none;
|
|
|
|
|
|
position: relative;
|
2026-04-13 18:06:25 +08:00
|
|
|
|
transition: background-color 0.2s ease;
|
|
|
|
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
|
|
background-color: var(--gray-25);
|
|
|
|
|
|
}
|
2025-12-27 14:50:32 +08:00
|
|
|
|
|
2026-04-26 18:51:38 +08:00
|
|
|
|
& > span {
|
2026-04-13 18:06:25 +08:00
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
2025-12-27 14:50:32 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.tool-name {
|
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
|
color: var(--main-700);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.tool-loader {
|
2026-04-13 18:06:25 +08:00
|
|
|
|
margin-top: 0;
|
|
|
|
|
|
color: var(--main-600);
|
2025-12-27 14:50:32 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.tool-loader.rotate {
|
|
|
|
|
|
animation: rotate 2s linear infinite;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.tool-loader.tool-success {
|
2026-04-13 18:06:25 +08:00
|
|
|
|
color: var(--color-success-500);
|
2025-12-27 14:50:32 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.tool-loader.tool-error {
|
|
|
|
|
|
color: var(--color-error-500);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.tool-loader.tool-loading {
|
|
|
|
|
|
color: var(--color-info-500);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.tool-expand-icon {
|
|
|
|
|
|
margin-left: auto;
|
2026-04-13 18:06:25 +08:00
|
|
|
|
color: var(--gray-300);
|
2025-12-27 14:50:32 +08:00
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.tool-header-content {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
flex: 1;
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
|
text-overflow: ellipsis;
|
2026-04-13 18:06:25 +08:00
|
|
|
|
color: var(--gray-600);
|
2025-12-27 17:29:21 +08:00
|
|
|
|
|
2025-12-28 01:00:12 +08:00
|
|
|
|
:deep(.sep-header) {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
gap: 8px;
|
2026-04-13 18:06:25 +08:00
|
|
|
|
font-size: 13px;
|
2025-12-28 01:00:12 +08:00
|
|
|
|
width: 100%;
|
|
|
|
|
|
overflow: hidden;
|
2025-12-27 17:29:21 +08:00
|
|
|
|
|
2026-04-13 18:06:25 +08:00
|
|
|
|
.note {
|
2026-04-19 23:28:58 +08:00
|
|
|
|
font-weight: 500;
|
|
|
|
|
|
color: var(--gray-600);
|
2026-04-13 18:06:25 +08:00
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
|
}
|
2025-12-28 01:00:12 +08:00
|
|
|
|
|
2026-04-13 18:06:25 +08:00
|
|
|
|
.separator {
|
|
|
|
|
|
color: var(--gray-300);
|
|
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
|
}
|
2026-02-03 15:04:36 +08:00
|
|
|
|
|
2026-04-13 18:06:25 +08:00
|
|
|
|
.description {
|
|
|
|
|
|
color: var(--gray-500);
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
|
min-width: 0;
|
|
|
|
|
|
}
|
2025-12-28 01:00:12 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-04-13 18:06:25 +08:00
|
|
|
|
:deep(.keywords) {
|
|
|
|
|
|
color: var(--main-700);
|
|
|
|
|
|
font-weight: 600;
|
2025-12-28 01:00:12 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2025-12-27 17:29:21 +08:00
|
|
|
|
:deep(.tag) {
|
2026-04-13 18:06:25 +08:00
|
|
|
|
font-size: 11px;
|
|
|
|
|
|
color: var(--gray-500);
|
2026-02-03 14:03:57 +08:00
|
|
|
|
background-color: var(--gray-50);
|
2026-02-03 14:54:25 +08:00
|
|
|
|
padding: 0px 4px;
|
2025-12-27 17:29:21 +08:00
|
|
|
|
border-radius: 4px;
|
|
|
|
|
|
margin-left: 8px;
|
2026-04-13 18:06:25 +08:00
|
|
|
|
white-space: nowrap;
|
2026-02-03 14:03:57 +08:00
|
|
|
|
|
|
|
|
|
|
&.success {
|
|
|
|
|
|
color: var(--color-success-500);
|
|
|
|
|
|
background-color: var(--color-success-50);
|
|
|
|
|
|
}
|
|
|
|
|
|
&.error {
|
|
|
|
|
|
color: var(--color-error-500);
|
|
|
|
|
|
background-color: var(--color-error-50);
|
|
|
|
|
|
}
|
2025-12-27 17:29:21 +08:00
|
|
|
|
}
|
2025-12-27 14:50:32 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.tool-content {
|
|
|
|
|
|
transition: all 0.3s ease;
|
|
|
|
|
|
|
|
|
|
|
|
.tool-params {
|
|
|
|
|
|
padding: 8px 12px;
|
|
|
|
|
|
background-color: var(--gray-25);
|
2026-04-13 18:06:25 +08:00
|
|
|
|
border-bottom: 1px solid var(--gray-50);
|
2025-12-27 14:50:32 +08:00
|
|
|
|
|
|
|
|
|
|
.tool-params-content {
|
|
|
|
|
|
margin: 0;
|
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
|
overflow-x: auto;
|
2026-04-13 18:06:25 +08:00
|
|
|
|
color: var(--gray-600);
|
2025-12-27 14:50:32 +08:00
|
|
|
|
line-height: 1.5;
|
|
|
|
|
|
|
|
|
|
|
|
pre {
|
|
|
|
|
|
margin: 0;
|
|
|
|
|
|
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2026-04-13 18:06:25 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
&.is-collapsed {
|
|
|
|
|
|
.tool-header {
|
|
|
|
|
|
border-bottom: none;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
&.is-timeline {
|
|
|
|
|
|
border: none;
|
|
|
|
|
|
border-radius: 0;
|
|
|
|
|
|
overflow: visible;
|
|
|
|
|
|
margin-bottom: 0;
|
|
|
|
|
|
padding-left: 0;
|
|
|
|
|
|
position: relative;
|
2025-12-27 14:50:32 +08:00
|
|
|
|
|
2026-04-13 18:06:25 +08:00
|
|
|
|
.tool-header {
|
|
|
|
|
|
padding: 4px 0;
|
2025-12-27 14:50:32 +08:00
|
|
|
|
background-color: transparent;
|
2026-04-13 18:06:25 +08:00
|
|
|
|
border-bottom: none;
|
|
|
|
|
|
color: var(--gray-500);
|
|
|
|
|
|
gap: 10px;
|
2025-12-27 14:50:32 +08:00
|
|
|
|
|
2026-04-13 18:06:25 +08:00
|
|
|
|
&:hover {
|
2025-12-27 14:50:32 +08:00
|
|
|
|
background-color: transparent;
|
2026-04-13 18:06:25 +08:00
|
|
|
|
color: var(--gray-700);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.tool-name {
|
|
|
|
|
|
color: var(--gray-600);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.tool-loader {
|
2026-05-17 19:55:29 +08:00
|
|
|
|
color: var(--gray-600);
|
2026-04-13 18:06:25 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.tool-expand-icon {
|
|
|
|
|
|
opacity: 0.5;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.tool-header-content {
|
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
|
color: var(--gray-500);
|
2025-12-27 14:50:32 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-04-13 18:06:25 +08:00
|
|
|
|
.tool-content {
|
2026-04-26 00:47:30 +08:00
|
|
|
|
margin: 4px 0 8px 8px;
|
|
|
|
|
|
padding-left: 8px;
|
2026-04-13 18:06:25 +08:00
|
|
|
|
border-left: 1px solid var(--gray-100);
|
|
|
|
|
|
|
2026-06-01 22:29:18 +08:00
|
|
|
|
&:hover {
|
|
|
|
|
|
border-left-color: var(--gray-400);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-04-13 18:06:25 +08:00
|
|
|
|
.tool-params {
|
|
|
|
|
|
padding: 4px 0 8px;
|
|
|
|
|
|
background-color: transparent;
|
|
|
|
|
|
border-bottom: none;
|
|
|
|
|
|
}
|
2025-12-27 14:50:32 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@keyframes rotate {
|
|
|
|
|
|
from {
|
|
|
|
|
|
transform: rotate(0deg);
|
|
|
|
|
|
}
|
|
|
|
|
|
to {
|
|
|
|
|
|
transform: rotate(360deg);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* Default Renderer Styles */
|
|
|
|
|
|
.tool-result-renderer {
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
|
|
|
|
|
|
.default-result {
|
|
|
|
|
|
background: var(--gray-0);
|
|
|
|
|
|
border-radius: 8px;
|
|
|
|
|
|
|
|
|
|
|
|
.default-content {
|
|
|
|
|
|
background: var(--gray-0);
|
2026-04-13 18:06:25 +08:00
|
|
|
|
padding: 8px 0px;
|
2025-12-27 14:50:32 +08:00
|
|
|
|
|
|
|
|
|
|
pre {
|
|
|
|
|
|
margin: 0;
|
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
|
line-height: 1.4;
|
|
|
|
|
|
color: var(--gray-700);
|
|
|
|
|
|
white-space: pre-wrap;
|
|
|
|
|
|
word-break: break-word;
|
|
|
|
|
|
max-height: 300px;
|
|
|
|
|
|
overflow-y: auto;
|
2026-04-13 18:06:25 +08:00
|
|
|
|
background: var(--gray-25);
|
2025-12-27 14:50:32 +08:00
|
|
|
|
padding: 10px;
|
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2026-01-15 06:01:34 +08:00
|
|
|
|
</style>
|