Skip to content

Commit efbd93c

Browse files
committed
2 parents ab72500 + 9712a02 commit efbd93c

3 files changed

Lines changed: 28 additions & 19 deletions

File tree

custom/conversation_area/ToolRenderer.vue

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<template>
22
<div
33
ref="toolRendererRef"
4-
class="py-1 inline-flex justify-center m-2
5-
flex-col gap-3 rounded-xl px-2 text-lightListTableHeadingText
4+
class="py-1 inline-flex justify-center m-2 max-w-full min-w-0
5+
flex-col gap-3 rounded-xl px-2 text-lightListTableHeadingText
66
dark:text-darkListTableHeadingText select-none
7-
"
7+
"
88
:class="[
99
isInputOutputExpanded ? 'items-start border-none' : '',
1010
activateShrinkedStyle ? 'border items-center' : '',
@@ -25,15 +25,15 @@
2525
</div>
2626

2727
<div class="min-w-0">
28-
<p class="break-all font-mono text-sm leading-5 text-nowrap">
28+
<p class="break-words font-mono text-sm leading-5">
2929
{{ props.data?.toolInfo?.toolInfo ? props.data.toolInfo.toolInfo : props.data?.toolInfo?.toolName}}
3030
</p>
3131
</div>
3232
<IconAngleDownOutline
3333
v-if="hasToolSections"
3434
:class="isInputOutputExpanded ? 'rotate-180' : 'rotate-0'"
3535
@transitionend="finishTransition()"
36-
class="cursor-pointer transition-transform duration-300 hover:scale-105"
36+
class="shrink-0 cursor-pointer transition-transform duration-300 hover:scale-105"
3737
/>
3838
</div>
3939
<transition name="expand">
@@ -112,9 +112,11 @@
112112
onMounted(async () => {
113113
await nextTick();
114114
if (toolRendererRef.value && props.data.toolInfo) {
115-
toolRendererInitialWidth.value = toolRendererRef.value.offsetWidth;
115+
const contentWidth = Math.ceil(toolRendererRef.value.getBoundingClientRect().width);
116+
const parentWidth = toolRendererRef.value.parentElement?.clientWidth ?? Infinity;
117+
toolRendererInitialWidth.value = Math.min(contentWidth, parentWidth);
116118
}
117-
});
119+
});
118120
119121
watch(isInputOutputExpanded, (newValue) => {
120122
if (newValue) {

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"description": "AI agent plugin for AdminForth with tool-based workflows and persistent chat sessions",
2626
"devDependencies": {
2727
"@types/node": "latest",
28-
"adminforth": "^3.6.2",
28+
"adminforth": "^3.7.1",
2929
"semantic-release": "^24.2.1",
3030
"semantic-release-slack-bot": "^4.0.2",
3131
"typescript": "^5.7.3"
@@ -67,6 +67,6 @@
6767
}
6868
],
6969
"peerDependencies": {
70-
"adminforth": "^3.6.2"
70+
"adminforth": "^3.7.1"
7171
}
7272
}

pnpm-lock.yaml

Lines changed: 17 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)