feat: 先进智能体功能上线
- 基于 agent-runtime 打造,默认 ReAct agent - 支持 agent 能力对接,已对接工作流、插件、知识库等 tool 能力 - 全新 agent 编排界面,支持可视化便捷配置 agent - 全新 agent 聊天界面,支持快捷操作、额外知识库选择等
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
<script lang="ts" setup>
|
||||
import { computed } from 'vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
import {computed} from 'vue';
|
||||
import {useRoute} from 'vue-router';
|
||||
|
||||
import { useContentMaximize, useTabs } from '@easyflow/hooks';
|
||||
import { preferences } from '@easyflow/preferences';
|
||||
import { useTabbarStore } from '@easyflow/stores';
|
||||
import {useContentMaximize, useTabs} from '@easyflow/hooks';
|
||||
import {preferences} from '@easyflow/preferences';
|
||||
import {useTabbarStore} from '@easyflow/stores';
|
||||
|
||||
import { TabsToolMore, TabsToolScreen, TabsView } from '@easyflow-core/tabs-ui';
|
||||
import {TabsToolMore, TabsToolScreen, TabsView} from '@easyflow-core/tabs-ui';
|
||||
|
||||
import { useTabbar } from './use-tabbar';
|
||||
import {useTabbar} from './use-tabbar';
|
||||
|
||||
defineOptions({
|
||||
name: 'LayoutTabbar',
|
||||
@@ -30,13 +30,17 @@ const {
|
||||
} = useTabbar();
|
||||
|
||||
const menus = computed(() => {
|
||||
const tab = tabbarStore.getTabByKey(currentActive.value);
|
||||
const menus = createContextMenus(tab);
|
||||
return menus.map((item) => {
|
||||
return (currentTabs.value || []).map((tab) => {
|
||||
const key = tab.key as string;
|
||||
const title =
|
||||
(tab.meta?.newTabTitle || tab.meta?.title || tab.name || tab.path) as
|
||||
| string
|
||||
| undefined;
|
||||
return {
|
||||
...item,
|
||||
label: item.text,
|
||||
value: item.key,
|
||||
active: key === currentActive.value,
|
||||
handler: () => handleClick(key),
|
||||
label: title || key,
|
||||
value: key,
|
||||
};
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
import type { RouteLocationNormalizedGeneric } from 'vue-router';
|
||||
import type {TabDefinition} from '@easyflow/types';
|
||||
|
||||
import type { TabDefinition } from '@easyflow/types';
|
||||
import type {IContextMenuItem} from '@easyflow-core/tabs-ui';
|
||||
|
||||
import type { IContextMenuItem } from '@easyflow-core/tabs-ui';
|
||||
import {computed, ref, watch} from 'vue';
|
||||
import {useRoute, useRouter} from 'vue-router';
|
||||
|
||||
import { computed, ref, watch } from 'vue';
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
|
||||
import { useContentMaximize, useTabs } from '@easyflow/hooks';
|
||||
import {useContentMaximize, useTabs} from '@easyflow/hooks';
|
||||
import {
|
||||
ArrowLeftToLine,
|
||||
ArrowRightLeft,
|
||||
@@ -21,9 +19,9 @@ import {
|
||||
RotateCw,
|
||||
X,
|
||||
} from '@easyflow/icons';
|
||||
import { $t, useI18n } from '@easyflow/locales';
|
||||
import { getTabKey, useAccessStore, useTabbarStore } from '@easyflow/stores';
|
||||
import { filterTree } from '@easyflow/utils';
|
||||
import {$t, useI18n} from '@easyflow/locales';
|
||||
import {getTabKey, useAccessStore, useTabbarStore} from '@easyflow/stores';
|
||||
import {filterTree} from '@easyflow/utils';
|
||||
|
||||
export function useTabbar() {
|
||||
const router = useRouter();
|
||||
@@ -52,7 +50,7 @@ export function useTabbar() {
|
||||
});
|
||||
|
||||
const { locale } = useI18n();
|
||||
const currentTabs = ref<RouteLocationNormalizedGeneric[]>();
|
||||
const currentTabs = ref<TabDefinition[]>();
|
||||
watch(
|
||||
[
|
||||
() => tabbarStore.getTabs,
|
||||
@@ -99,7 +97,7 @@ export function useTabbar() {
|
||||
}
|
||||
}
|
||||
|
||||
function wrapperTabLocale(tab: RouteLocationNormalizedGeneric) {
|
||||
function wrapperTabLocale(tab: TabDefinition) {
|
||||
const navTitle = tab?.meta?.navTitle as string | undefined;
|
||||
return {
|
||||
...tab,
|
||||
|
||||
Reference in New Issue
Block a user