Update copilot
This commit is contained in:
@@ -159,7 +159,14 @@ watch(
|
||||
:conversation-inbox-type="conversationInboxType"
|
||||
/>
|
||||
</template>
|
||||
<CopilotThinkingGroup v-else :messages="item.messages" />
|
||||
<CopilotThinkingGroup
|
||||
v-else
|
||||
:messages="item.messages"
|
||||
:has-assistant-message-after="
|
||||
groupedMessages[groupedMessages.indexOf(item) + 1]?.message
|
||||
?.role === 'assistant'
|
||||
"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<CopilotLoader v-if="isCaptainTyping" />
|
||||
|
||||
@@ -1,16 +1,28 @@
|
||||
<script setup>
|
||||
import { ref } from 'vue';
|
||||
import { ref, watch } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import Icon from '../icon/Icon.vue';
|
||||
import CopilotThinkingBlock from 'dashboard/components/copilot/CopilotThinkingBlock.vue';
|
||||
|
||||
defineProps({ messages: { type: Array, required: true } });
|
||||
const props = defineProps({
|
||||
messages: { type: Array, required: true },
|
||||
hasAssistantMessageAfter: { type: Boolean, default: false },
|
||||
});
|
||||
const { t } = useI18n();
|
||||
const isExpanded = ref(false);
|
||||
const isExpanded = ref(!props.hasAssistantMessageAfter);
|
||||
|
||||
watch(
|
||||
() => props.hasAssistantMessageAfter,
|
||||
newValue => {
|
||||
if (newValue) {
|
||||
isExpanded.value = false;
|
||||
}
|
||||
}
|
||||
);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="flex flex-col gap-2">
|
||||
<div class="flex flex-col gap-2 pl-4">
|
||||
<button
|
||||
class="flex items-center gap-2 text-xs text-n-slate-10 hover:text-n-slate-11"
|
||||
@click="isExpanded = !isExpanded"
|
||||
|
||||
@@ -132,7 +132,7 @@ const handleClose = () => {
|
||||
<template>
|
||||
<div
|
||||
v-if="isSidebarOpen"
|
||||
class="border-l border-n-weak w-[18rem] min-w-[18rem]"
|
||||
class="border-l border-n-weak w-[20rem] min-w-[20rem]"
|
||||
>
|
||||
<Copilot
|
||||
:messages="messages"
|
||||
|
||||
@@ -12,13 +12,13 @@ defineProps({
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="flex flex-col gap-2 p-2 rounded bg-n-background">
|
||||
<div class="flex flex-col gap-1 px-2 rounded bg-n-background">
|
||||
<div
|
||||
v-if="reasoning"
|
||||
class="text-xs text-n-slate-11 border-t border-n-weak pt-2"
|
||||
class="text-xs text-n-slate-11 border-t border-n-weak"
|
||||
>
|
||||
{{ reasoning }}
|
||||
</div>
|
||||
<p class="text-sm text-n-slate-12">{{ content }}</p>
|
||||
<p class="text-sm text-n-slate-11">{{ content }}</p>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -35,7 +35,7 @@ const closeConversationPanel = () => {
|
||||
<template>
|
||||
<div
|
||||
v-if="showConversationSidebar"
|
||||
class="ltr:border-l rtl:border-r border-n-weak h-full overflow-hidden z-10 w-[18rem] min-w-[18rem] flex flex-col"
|
||||
class="ltr:border-l rtl:border-r border-n-weak h-full overflow-hidden z-10 w-[20rem] min-w-[20rem] flex flex-col"
|
||||
>
|
||||
<div class="flex flex-1 flex-col overflow-auto">
|
||||
<div
|
||||
|
||||
Reference in New Issue
Block a user