feat: add new stores for cron, locale, providers, script, shared data, skills, and user info
- Implemented `cron` store to manage scheduled tasks with CRUD operations. - Created `locale` store for language settings with persistence and system language detection. - Added `providers` store to handle provider accounts and configurations with API interactions. - Developed `script` store for managing automation scripts, including recording and execution. - Introduced `sharedStore` for managing shared data across components. - Established `skills` store for fetching, installing, and managing skills from a marketplace. - Created `userinfo` store for user authentication and session management. chore: update path aliases from `@store` to `@stores` in TypeScript configuration and Vite config
This commit is contained in:
@@ -49,8 +49,8 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, computed, watch, nextTick, onMounted } from 'vue'
|
||||
import { useChatStore } from '@store/chat'
|
||||
import { stageBuffer } from '@store/chat'
|
||||
import { useChatStore } from '@stores/chat'
|
||||
import { stageBuffer } from '@stores/chat'
|
||||
import type { RawMessage, AttachedFileMeta } from './model/ChatModel'
|
||||
import { extractText, extractImages } from './model/ChatModel'
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, computed, onMounted, onBeforeUnmount } from 'vue'
|
||||
import { RiSideBarLine, RiSidebarFoldLine, RiAddLine } from '@remixicon/vue'
|
||||
import { useChatStore } from '@store/chat'
|
||||
import { useChatStore } from '@stores/chat'
|
||||
|
||||
const chatStore = useChatStore()
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="task p-[12px]">
|
||||
<div class="task p-3">
|
||||
<div class="flex border border-[#BEDBFF] dark:border-[#2a2a2d] h-[48px] p-[4px] rounded-[10px] bg-[#EFF6FF] dark:bg-[#222225] task-tab">
|
||||
<div v-for="item in tabs" :key="item.value" class="flex-1 flex text-center items-center h-full align-middle text" :class="active === item.value && 'active'" @click="changeTab(item.value)">
|
||||
<div class="flex-1">{{ item.name }}<span v-if="item.total">{{`(${item.total > 98 && item.total + '+' || item.total})`}}</span></div>
|
||||
@@ -15,15 +15,18 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive } from "vue";
|
||||
|
||||
const tabs = reactive([{
|
||||
name: '待处理',
|
||||
value: 1,
|
||||
total: 10,
|
||||
},{
|
||||
name: '已处理',
|
||||
value: 2,
|
||||
total: 99,
|
||||
}])
|
||||
const tabs = reactive([
|
||||
{
|
||||
name: '待处理',
|
||||
value: 1,
|
||||
total: 10,
|
||||
},
|
||||
{
|
||||
name: '已处理',
|
||||
value: 2,
|
||||
total: 99,
|
||||
}
|
||||
])
|
||||
const active = ref(1);
|
||||
const changeTab = (val:number) => {
|
||||
active.value = val;
|
||||
|
||||
@@ -144,7 +144,7 @@ import {
|
||||
extractToolUse,
|
||||
} from '../../model/ChatModel'
|
||||
|
||||
import { useChatStore } from '@store/chat'
|
||||
import { useChatStore } from '@stores/chat'
|
||||
import ChatAvatar from '../ChatAvatar.vue'
|
||||
import ChatAttach from '../ChatAttach.vue'
|
||||
import ChatAIMark from '../ChatAIMark.vue'
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<ChatBox class="flex-1" />
|
||||
<TaskCenter />
|
||||
</div>
|
||||
<Task class="w-[392px] h-full rounded-[16px] bg-white dark:bg-[#1b1b1d]" />
|
||||
<TaskList class="w-98 h-full rounded-2xl bg-white dark:bg-[#1b1b1d]" />
|
||||
</div>
|
||||
|
||||
<TaskOperationDialog ref="taskOperationDialog" />
|
||||
@@ -15,13 +15,13 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, onBeforeUnmount } from 'vue'
|
||||
import Task from './components/Task.vue'
|
||||
import TaskList from '../../components/TaskList/index.vue'
|
||||
import TaskOperationDialog from './components/TaskOperationDialog.vue'
|
||||
import ChatHistory from './ChatHistory.vue'
|
||||
import ChatBox from './ChatBox.vue'
|
||||
import TaskCenter from './TaskCenter.vue'
|
||||
import { useChatStore } from '@store/chat'
|
||||
import { useProviderStore } from '@store/providers'
|
||||
import { useChatStore } from '@stores/chat'
|
||||
import { useProviderStore } from '@stores/providers'
|
||||
import emitter from '@src/utils/emitter'
|
||||
|
||||
const chatStore = useChatStore()
|
||||
|
||||
Reference in New Issue
Block a user