发布 v1.10 #5

Merged
czm merged 147 commits from develop into main 2026-08-20 11:36:27 +08:00
8 changed files with 38 additions and 35 deletions
Showing only changes of commit 24b1142738 - Show all commits

View File

@@ -1,5 +1,5 @@
<script setup lang="ts">
import type {AiChatMessage, AiToolApprovalPayload} from './types';
import type { AiChatMessage, AiToolApprovalPayload } from './types';
import AiErrorNotice from './AiErrorNotice.vue';
import AiKnowledgeCard from './AiKnowledgeCard.vue';

View File

@@ -4,6 +4,7 @@ import type { TagProps } from 'element-plus';
import { computed } from 'vue';
import { useAccess } from '@easyflow/access';
import { IconifyIcon } from '@easyflow/icons';
import { Loading, MoreFilled } from '@element-plus/icons-vue';
import {
@@ -243,10 +244,7 @@ function resolveMetaItems(item: any) {
</ElTag>
</slot>
</div>
<div
v-if="resolveMetaItems(item).length > 0"
class="card-meta-row"
>
<div v-if="resolveMetaItems(item).length > 0" class="card-meta-row">
<span
v-for="meta in resolveMetaItems(item)"
:key="meta.label"
@@ -274,11 +272,7 @@ function resolveMetaItems(item: any) {
</div>
</div>
<div
v-if="hasVisibleActions(item)"
class="card-actions"
@click.stop
>
<div v-if="hasVisibleActions(item)" class="card-actions" @click.stop>
<ElButton
v-for="(action, actionIndex) in resolveInlineActions(item)"
:key="`${item.id ?? index}-inline-${actionIndex}`"

View File

@@ -127,11 +127,12 @@ const strategyOptions = [
},
];
const fileExt = computed(() =>
String(props.documentTitle || '')
.split('.')
.pop()
?.toLowerCase() || '',
const fileExt = computed(
() =>
String(props.documentTitle || '')
.split('.')
.pop()
?.toLowerCase() || '',
);
const isPptx = computed(() => fileExt.value === 'pptx');

View File

@@ -12,7 +12,7 @@ import {
SvgCakeIcon,
SvgCardIcon,
SvgDownloadIcon,
} from '@easyflow/icons';
} from '@easyflow/icons/svg';
import AnalyticsTrends from './analytics-trends.vue';
import AnalyticsVisitsData from './analytics-visits-data.vue';

View File

@@ -1,8 +1,9 @@
<script setup lang="ts">
import type {ChatTimelineKnowledgeHit} from './types';
import type { ChatTimelineKnowledgeHit } from './types';
import {BookOpenText, X} from '@easyflow/icons';
import {computed, ref} from 'vue';
import { computed, ref } from 'vue';
import { BookOpenText, X } from '@easyflow/icons';
interface KnowledgeCitation {
id: string;
@@ -50,13 +51,15 @@ function resolveGroupKey(item: ChatTimelineKnowledgeHit, index: number) {
return `faq:${label || asText(item.knowledgeId) || index}`;
}
const sourceName = asText(item.documentName) || sourceFileName(item);
return [
'doc',
sourceName || asText(item.sourceUri) || label || asText(item.documentId),
asText(item.knowledgeId),
]
.filter(Boolean)
.join(':') || `doc:${index}`;
return (
[
'doc',
sourceName || asText(item.sourceUri) || label || asText(item.documentId),
asText(item.knowledgeId),
]
.filter(Boolean)
.join(':') || `doc:${index}`
);
}
function formatScore(score: ChatTimelineKnowledgeHit['score']) {
@@ -65,7 +68,9 @@ function formatScore(score: ChatTimelineKnowledgeHit['score']) {
}
const numberValue = Number(score);
if (Number.isFinite(numberValue)) {
return numberValue > 1 ? numberValue.toFixed(2) : `${Math.round(numberValue * 100)}%`;
return numberValue > 1
? numberValue.toFixed(2)
: `${Math.round(numberValue * 100)}%`;
}
return String(score);
}
@@ -97,8 +102,8 @@ const citations = computed<KnowledgeCitation[]>(() => {
return [...groups.values()];
});
const activeCitation = computed(
() => citations.value.find((citation) => citation.id === activeId.value),
const activeCitation = computed(() =>
citations.value.find((citation) => citation.id === activeId.value),
);
function toggleCitation(id: string) {
@@ -318,7 +323,7 @@ function toggleCitation(id: string) {
.chat-knowledge-card__popover-meta span + span::before {
margin-right: 6px;
color: var(--el-border-color);
content: "·";
content: '·';
}
.chat-knowledge-card__close {
@@ -369,7 +374,7 @@ function toggleCitation(id: string) {
.chat-knowledge-card__meta span + span::before {
margin-right: 6px;
color: var(--el-border-color);
content: "/";
content: '/';
}
.chat-knowledge-card__content {

View File

@@ -1,7 +1,7 @@
<script setup lang="ts">
import { useRoute } from 'vue-router';
import { SvgDingDingIcon } from '@easyflow/icons';
import { SvgDingDingIcon } from '@easyflow/icons/svg';
import { $t } from '@easyflow/locales';
import { alert, useEasyFlowModal } from '@easyflow-core/popup-ui';

View File

@@ -5,7 +5,7 @@ import type { EasyFlowFormSchema } from '@easyflow-core/form-ui';
import type { AuthenticationProps } from './types';
import { computed, onMounted, reactive, ref } from 'vue';
import { computed, defineAsyncComponent, onMounted, reactive, ref } from 'vue';
import { useRouter } from 'vue-router';
import { $t } from '@easyflow/locales';
@@ -14,7 +14,6 @@ import { useEasyFlowForm } from '@easyflow-core/form-ui';
import { EasyFlowButton, EasyFlowCheckbox } from '@easyflow-core/shadcn-ui';
import Title from './auth-title.vue';
import ThirdPartyLogin from './third-party-login.vue';
interface Props extends AuthenticationProps {
formSchema?: EasyFlowFormSchema[];
@@ -47,6 +46,10 @@ const emit = defineEmits<{
submit: [Recordable<any>];
}>();
const ThirdPartyLogin = defineAsyncComponent(
() => import('./third-party-login.vue'),
);
const [Form, formApi] = useEasyFlowForm(
reactive({
commonConfig: {

View File

@@ -5,7 +5,7 @@ import {
SvgGoogleIcon,
SvgQQChatIcon,
SvgWeChatIcon,
} from '@easyflow/icons';
} from '@easyflow/icons/svg';
import { $t } from '@easyflow/locales';
import { EasyFlowIconButton } from '@easyflow-core/shadcn-ui';