|
11 | 11 | <span class="font-semibold">Call tools</span> |
12 | 12 | </h3> |
13 | 13 |
|
14 | | - |
| 14 | + <div class="flex flex-wrap"> |
15 | 15 | <template v-for="group in props.toolGroup" :key="group.title"> |
16 | | - <div v-if="group.groupedTools.length > 1" class="flex flex-col"> |
17 | | - <div class="flex items-center gap-2 px-2 m-2 cursor-pointer hover:opacity-75 break-all font-mono text-sm leading-5 text-lightListTableHeadingText dark:text-darkListTableHeadingText" @click="toggleGroup(group.title)"> |
| 16 | + <template v-if="group.groupedTools.length > 1"> |
| 17 | + <div |
| 18 | + v-if="!expandedGroups.includes(group.title)" |
| 19 | + class="max-w-64 w-auto flex items-center gap-2 px-2 m-2 py-2.5 cursor-pointer |
| 20 | + hover:opacity-75 break-all font-mono text-sm leading-5 |
| 21 | + text-lightListTableHeadingText dark:text-darkListTableHeadingText |
| 22 | + items-center justify-center |
| 23 | + " |
| 24 | + :class="!expandedGroups.includes(group.title) ? 'border rounded-xl' : ''" |
| 25 | + @click="toggleGroup(group.title)" |
| 26 | + > |
18 | 27 | <IconCheckOutline class="w-6 h-6 p-1"/> |
19 | 28 | {{ group.title }} {{ 'x' + group.groupedTools.length }} |
20 | 29 | <IconAngleDownOutline |
21 | 30 | class="transition-transform duration-200 hover:scale-105 hover:opacity-75" |
22 | 31 | :class="expandedGroups.includes(group.title) ? 'rotate-180' : 'rotate-0'" |
23 | 32 | /> |
24 | 33 | </div> |
25 | | - <transition name="expand"> |
26 | | - <div v-show="expandedGroups.includes(group.title)" class="flex flex-col"> |
27 | | - <ToolRenderer v-for="part in group.groupedTools" :key="part.toolInfo.toolCallId" :data="part" class="ml-8"/> |
28 | | - </div> |
29 | | - </transition> |
30 | | - </div> |
| 34 | + <!-- <transition name="expand"> |
| 35 | + <div v-show="expandedGroups.includes(group.title)" class="flex flex-wrap gap-1"> --> |
| 36 | + <ToolRenderer v-if="expandedGroups.includes(group.title)" v-for="part in group.groupedTools" :key="part.toolInfo.toolCallId" :data="part"/> |
| 37 | + <!-- </div> |
| 38 | + </transition> --> |
| 39 | + </template> |
31 | 40 | <ToolRenderer v-else-if="group.groupedTools.length > 0" :data="group.groupedTools[0]" /> |
32 | 41 | </template> |
| 42 | + </div> |
33 | 43 | </template> |
34 | 44 | </template> |
35 | 45 |
|
|
0 commit comments