mirror of
https://github.com/memohai/Memoh.git
synced 2026-04-25 07:00:48 +09:00
refactor: change npm package from @memoh to @memohai
This commit is contained in:
@@ -58,7 +58,7 @@ jobs:
|
||||
run: pnpm install --no-frozen-lockfile
|
||||
|
||||
- name: Build with VitePress
|
||||
run: pnpm --filter @memoh/docs build
|
||||
run: pnpm --filter @memohai/docs build
|
||||
|
||||
- name: Deploy to GitHub Pages
|
||||
uses: peaceiris/actions-gh-pages@v4
|
||||
|
||||
@@ -35,7 +35,7 @@ Infrastructure dependencies:
|
||||
- **Framework**: Vue 3 (Composition API)
|
||||
- **Build Tool**: Vite
|
||||
- **State Management**: Pinia + Pinia Colada
|
||||
- **UI**: Tailwind CSS 4 + custom component library (`@memoh/ui`) + Reka UI
|
||||
- **UI**: Tailwind CSS 4 + custom component library (`@memohai/ui`) + Reka UI
|
||||
- **i18n**: vue-i18n
|
||||
- **Markdown**: markstream-vue + Shiki + Mermaid + KaTeX
|
||||
- **Package Manager**: pnpm monorepo
|
||||
@@ -147,12 +147,12 @@ Memoh/
|
||||
│ │ ├── types/ # TypeScript type definitions
|
||||
│ │ ├── storage.ts # Browser context storage
|
||||
│ │ └── models.ts # Zod request schemas
|
||||
│ └── web/ # Main web app (@memoh/web, Vue 3)
|
||||
│ └── web/ # Main web app (@memohai/web, Vue 3)
|
||||
├── packages/ # Shared TypeScript libraries
|
||||
│ ├── ui/ # Shared UI component library (@memoh/ui)
|
||||
│ ├── sdk/ # TypeScript SDK (@memoh/sdk, auto-generated from OpenAPI)
|
||||
│ ├── cli/ # CLI tool (@memoh/cli, Commander.js)
|
||||
│ └── config/ # Shared configuration utilities (@memoh/config)
|
||||
│ ├── ui/ # Shared UI component library (@memohai/ui)
|
||||
│ ├── sdk/ # TypeScript SDK (@memohai/sdk, auto-generated from OpenAPI)
|
||||
│ ├── cli/ # CLI tool (@memohai/cli, Commander.js)
|
||||
│ └── config/ # Shared configuration utilities (@memohai/config)
|
||||
├── spec/ # OpenAPI specifications (swagger.json, swagger.yaml)
|
||||
├── db/ # Database
|
||||
│ ├── migrations/ # SQL migration files
|
||||
@@ -247,7 +247,7 @@ Migrations live in `db/migrations/` and follow a dual-update convention:
|
||||
1. Write handlers in `internal/handlers/` with swaggo annotations.
|
||||
2. Run `mise run swagger-generate` to update the OpenAPI docs (output in `spec/`).
|
||||
3. Run `mise run sdk-generate` to update the frontend TypeScript SDK (`packages/sdk/`).
|
||||
4. The frontend calls APIs via the auto-generated `@memoh/sdk`.
|
||||
4. The frontend calls APIs via the auto-generated `@memohai/sdk`.
|
||||
|
||||
### Agent Development
|
||||
|
||||
@@ -265,7 +265,7 @@ Migrations live in `db/migrations/` and follow a dual-update convention:
|
||||
|
||||
- Use Vue 3 Composition API with `<script setup>` style.
|
||||
- Shared components belong in `packages/ui/`.
|
||||
- API calls use the auto-generated `@memoh/sdk`.
|
||||
- API calls use the auto-generated `@memohai/sdk`.
|
||||
- State management uses Pinia; data fetching uses Pinia Colada.
|
||||
- i18n via vue-i18n.
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
# @memoh/browser-gateway
|
||||
# @memohai/browser-gateway
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "@memoh/browser-gateway",
|
||||
"name": "@memohai/browser-gateway",
|
||||
"type": "module",
|
||||
"version": "0.5.0",
|
||||
"scripts": {
|
||||
@@ -14,7 +14,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@elysiajs/cors": "^1.4.1",
|
||||
"@memoh/config": "workspace:*",
|
||||
"@memohai/config": "workspace:*",
|
||||
"elysia": "1",
|
||||
"playwright": "1.50.0",
|
||||
"zod": "^4.3.6"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Elysia } from 'elysia'
|
||||
import { loadConfig } from '@memoh/config'
|
||||
import { loadConfig } from '@memohai/config'
|
||||
import { corsMiddleware } from './middlewares/cors'
|
||||
import { errorMiddleware } from './middlewares/error'
|
||||
import { initBrowsers, browsers } from './browser'
|
||||
|
||||
+10
-10
@@ -2,7 +2,7 @@
|
||||
|
||||
## Overview
|
||||
|
||||
`@memoh/web` is the management UI for Memoh, built with Vue 3 + Vite. It provides visual configuration for bots, models, channels, memory, and more.
|
||||
`@memohai/web` is the management UI for Memoh, built with Vue 3 + Vite. It provides visual configuration for bots, models, channels, memory, and more.
|
||||
|
||||
## Tech Stack
|
||||
|
||||
@@ -11,9 +11,9 @@
|
||||
| Framework | Vue 3 (Composition API, `<script setup>`) |
|
||||
| Build | Vite 8 + `@vitejs/plugin-vue` |
|
||||
| CSS | Tailwind CSS 4 (CSS-based config, no `tailwind.config.*`) |
|
||||
| UI Library | `@memoh/ui` (built on Reka UI + class-variance-authority) |
|
||||
| UI Library | `@memohai/ui` (built on Reka UI + class-variance-authority) |
|
||||
| State | Pinia 3 + `pinia-plugin-persistedstate` |
|
||||
| Data Fetching | Pinia Colada (`@pinia/colada`) + `@memoh/sdk` |
|
||||
| Data Fetching | Pinia Colada (`@pinia/colada`) + `@memohai/sdk` |
|
||||
| Forms | vee-validate + `@vee-validate/zod` + Zod |
|
||||
| i18n | vue-i18n (en / zh) |
|
||||
| Icons | FontAwesome (primary) + lucide-vue-next (secondary) |
|
||||
@@ -108,7 +108,7 @@ Auth guard: all routes except `/login` require `localStorage.getItem('token')`.
|
||||
|
||||
Three-tier layout architecture:
|
||||
|
||||
1. **MainLayout** (`layout/main-layout/`) — Top-level wrapper using `SidebarProvider` from `@memoh/ui`. Provides `#sidebar` and `#main` slots.
|
||||
1. **MainLayout** (`layout/main-layout/`) — Top-level wrapper using `SidebarProvider` from `@memohai/ui`. Provides `#sidebar` and `#main` slots.
|
||||
2. **Sidebar** (`components/sidebar/`) — Collapsible navigation with logo, menu items, and user avatar footer. Active route highlighting.
|
||||
3. **MainContainer** (`components/main-container/`) — Header (sidebar trigger + breadcrumb) + scrollable content area with `<KeepAlive>` wrapped `<RouterView>`.
|
||||
|
||||
@@ -178,9 +178,9 @@ katex/dist/katex.min.css — Math rendering
|
||||
vue-sonner/style.css — Toast notifications (in App.vue)
|
||||
```
|
||||
|
||||
## UI Components (@memoh/ui)
|
||||
## UI Components (@memohai/ui)
|
||||
|
||||
`@memoh/ui` provides 40+ components built on Reka UI primitives + Tailwind + class-variance-authority:
|
||||
`@memohai/ui` provides 40+ components built on Reka UI primitives + Tailwind + class-variance-authority:
|
||||
|
||||
- **Form**: `Form`, `FormField`, `FormItem`, `FormControl`, `FormLabel`, `FormMessage`
|
||||
- **Input**: `Input`, `Textarea`, `InputGroup`, `NativeSelect`, `Combobox`, `TagsInput`
|
||||
@@ -232,7 +232,7 @@ toast.error(resolveApiErrorMessage(error, 'Failed'))
|
||||
|
||||
### API Client Setup (`lib/api-client.ts`)
|
||||
|
||||
- SDK: `@memoh/sdk` auto-generated from OpenAPI via `@hey-api/openapi-ts`
|
||||
- SDK: `@memohai/sdk` auto-generated from OpenAPI via `@hey-api/openapi-ts`
|
||||
- Base URL: `VITE_API_URL` env var (defaults to `/api`, proxied by Vite dev server to backend)
|
||||
- Auth: Request interceptor attaches `Authorization: Bearer ${token}` from localStorage
|
||||
- 401 handling: Response interceptor removes token and redirects to `/login`
|
||||
@@ -319,16 +319,16 @@ Chat responses are streamed via Server-Sent Events:
|
||||
- Dev server port: 8082 (from `config.toml`)
|
||||
- Proxy: `/api` → backend (default `http://localhost:8080`)
|
||||
- Aliases: `@` → `./src`, `#` → `../ui/src`
|
||||
- Config: reads from `MEMOH_CONFIG_PATH` / `CONFIG_PATH` when provided, otherwise `../../config.toml`, via `@memoh/config`
|
||||
- Config: reads from `MEMOH_CONFIG_PATH` / `CONFIG_PATH` when provided, otherwise `../../config.toml`, via `@memohai/config`
|
||||
|
||||
## Development Rules
|
||||
|
||||
- Use Vue 3 Composition API with `<script setup>` exclusively.
|
||||
- Style with Tailwind utility classes; avoid `<style>` blocks.
|
||||
- **Always use semantic color tokens** (`text-foreground`, `bg-card`, `border-border`, `text-muted-foreground`, `bg-accent`, etc.) instead of raw colors (`gray-*`, `bg-white`, `text-black`). Never introduce hardcoded Tailwind color classes for themed elements — this breaks dark mode consistency.
|
||||
- Use `@memoh/ui` components for all UI primitives; do not import Reka UI directly.
|
||||
- Use `@memohai/ui` components for all UI primitives; do not import Reka UI directly.
|
||||
- Use Pinia Colada (`useQuery`/`useMutation`) for server state; use Pinia stores for client state only.
|
||||
- API calls must go through `@memoh/sdk`; never call `fetch()` directly.
|
||||
- API calls must go through `@memohai/sdk`; never call `fetch()` directly.
|
||||
- All user-facing strings must use i18n keys (`t('key')`) — never hardcode text.
|
||||
- Forms must use vee-validate + Zod schemas via `toTypedSchema()`.
|
||||
- Error messages via `resolveApiErrorMessage()` + `toast.error()`.
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
# @memoh/web
|
||||
# @memohai/web
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "@memoh/web",
|
||||
"name": "@memohai/web",
|
||||
"private": true,
|
||||
"version": "0.5.0",
|
||||
"type": "module",
|
||||
@@ -14,9 +14,9 @@
|
||||
"@fortawesome/free-regular-svg-icons": "^7.0.0",
|
||||
"@fortawesome/free-solid-svg-icons": "^7.0.0",
|
||||
"@fortawesome/vue-fontawesome": "^3.1.1",
|
||||
"@memoh/icon": "workspace:*",
|
||||
"@memoh/sdk": "workspace:*",
|
||||
"@memoh/ui": "workspace:*",
|
||||
"@memohai/icon": "workspace:*",
|
||||
"@memohai/sdk": "workspace:*",
|
||||
"@memohai/ui": "workspace:*",
|
||||
"@pinia/colada": "^0.21.1",
|
||||
"@shikijs/transformers": "^4.0.1",
|
||||
"@tailwindcss/vite": "^4.2.2",
|
||||
@@ -51,7 +51,7 @@
|
||||
"zod": "^4.3.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@memoh/config": "workspace:*",
|
||||
"@memohai/config": "workspace:*",
|
||||
"@types/node": "^24.10.1",
|
||||
"@types/qrcode": "^1.5.6",
|
||||
"@vitejs/plugin-vue": "^6.0.5",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { RouterView } from 'vue-router'
|
||||
import { Toaster } from '@memoh/ui'
|
||||
import { Toaster } from '@memohai/ui'
|
||||
import 'vue-sonner/style.css'
|
||||
import { useSettingsStore } from '@/store/settings'
|
||||
|
||||
|
||||
@@ -119,7 +119,7 @@ import {
|
||||
TagsInputItemDelete,
|
||||
TagsInputItemText,
|
||||
Switch,
|
||||
} from '@memoh/ui'
|
||||
} from '@memohai/ui'
|
||||
import z from 'zod'
|
||||
import { toTypedSchema } from '@vee-validate/zod'
|
||||
import { useForm } from 'vee-validate'
|
||||
|
||||
@@ -148,13 +148,13 @@ import {
|
||||
Label,
|
||||
Switch,
|
||||
Separator,
|
||||
} from '@memoh/ui'
|
||||
} from '@memohai/ui'
|
||||
import { toTypedSchema } from '@vee-validate/zod'
|
||||
import z from 'zod'
|
||||
import { useForm } from 'vee-validate'
|
||||
import { useMutation, useQueryCache } from '@pinia/colada'
|
||||
import { postProviders, postProvidersByIdImportModels } from '@memoh/sdk'
|
||||
import type { ProvidersCreateRequest } from '@memoh/sdk'
|
||||
import { postProviders, postProvidersByIdImportModels } from '@memohai/sdk'
|
||||
import type { ProvidersCreateRequest } from '@memohai/sdk'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import FormDialogShell from '@/components/form-dialog-shell/index.vue'
|
||||
import { useDialogMutation } from '@/composables/useDialogMutation'
|
||||
|
||||
@@ -21,7 +21,7 @@ import {
|
||||
Feishu,
|
||||
Wechat,
|
||||
Matrix,
|
||||
} from '@memoh/icon'
|
||||
} from '@memohai/icon'
|
||||
|
||||
const channelIcons: Record<string, Component> = {
|
||||
qq: Qq,
|
||||
|
||||
@@ -37,7 +37,7 @@ import {
|
||||
PopoverContent,
|
||||
PopoverTrigger,
|
||||
Spinner,
|
||||
} from '@memoh/ui'
|
||||
} from '@memohai/ui'
|
||||
|
||||
withDefaults(defineProps<{
|
||||
message: string
|
||||
|
||||
@@ -168,14 +168,14 @@ import {
|
||||
FormItem,
|
||||
Checkbox,
|
||||
Label,
|
||||
} from '@memoh/ui'
|
||||
} from '@memohai/ui'
|
||||
import { useForm } from 'vee-validate'
|
||||
import { inject, computed, watch, nextTick, type Ref, ref } from 'vue'
|
||||
import { toTypedSchema } from '@vee-validate/zod'
|
||||
import z from 'zod'
|
||||
import { useMutation, useQueryCache } from '@pinia/colada'
|
||||
import { postModels, putModelsById, putModelsModelByModelId } from '@memoh/sdk'
|
||||
import type { ModelsGetResponse, ModelsAddRequest, ModelsUpdateRequest } from '@memoh/sdk'
|
||||
import { postModels, putModelsById, putModelsModelByModelId } from '@memohai/sdk'
|
||||
import type { ModelsGetResponse, ModelsAddRequest, ModelsUpdateRequest } from '@memohai/sdk'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { COMPATIBILITY_OPTIONS } from '@/constants/compatibilities'
|
||||
import FormDialogShell from '@/components/form-dialog-shell/index.vue'
|
||||
|
||||
@@ -13,7 +13,7 @@ import {
|
||||
TableHead,
|
||||
TableHeader,
|
||||
TableRow,
|
||||
} from '@memoh/ui'
|
||||
} from '@memohai/ui'
|
||||
|
||||
const props = defineProps<{
|
||||
columns: ColumnDef<TData, TValue>[]
|
||||
|
||||
@@ -8,8 +8,8 @@ import {
|
||||
ContextMenuItem,
|
||||
ContextMenuSeparator,
|
||||
ContextMenuTrigger,
|
||||
} from '@memoh/ui'
|
||||
import type { HandlersFsFileInfo } from '@memoh/sdk'
|
||||
} from '@memohai/ui'
|
||||
import type { HandlersFsFileInfo } from '@memohai/sdk'
|
||||
import { formatFileSize, formatRelativeTime } from './utils'
|
||||
|
||||
const props = defineProps<{
|
||||
|
||||
@@ -3,13 +3,13 @@ import { ref, watch, computed, onBeforeUnmount } from 'vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { toast } from 'vue-sonner'
|
||||
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'
|
||||
import { Button, Spinner } from '@memoh/ui'
|
||||
import { Button, Spinner } from '@memohai/ui'
|
||||
import {
|
||||
getBotsByBotIdContainerFsRead,
|
||||
postBotsByBotIdContainerFsWrite,
|
||||
getBotsByBotIdContainerFsDownload,
|
||||
} from '@memoh/sdk'
|
||||
import type { HandlersFsFileInfo } from '@memoh/sdk'
|
||||
} from '@memohai/sdk'
|
||||
import type { HandlersFsFileInfo } from '@memohai/sdk'
|
||||
import { resolveApiErrorMessage } from '@/utils/api-error'
|
||||
import MonacoEditor from '@/components/monaco-editor/index.vue'
|
||||
import { isTextFile, isImageFile, formatFileSize } from './utils'
|
||||
|
||||
@@ -15,15 +15,15 @@ import {
|
||||
DialogFooter,
|
||||
Spinner,
|
||||
ScrollArea
|
||||
} from '@memoh/ui'
|
||||
} from '@memohai/ui'
|
||||
import {
|
||||
getBotsByBotIdContainerFsList,
|
||||
postBotsByBotIdContainerFsUpload,
|
||||
postBotsByBotIdContainerFsMkdir,
|
||||
postBotsByBotIdContainerFsDelete,
|
||||
postBotsByBotIdContainerFsRename,
|
||||
} from '@memoh/sdk'
|
||||
import type { HandlersFsFileInfo } from '@memoh/sdk'
|
||||
} from '@memohai/sdk'
|
||||
import type { HandlersFsFileInfo } from '@memohai/sdk'
|
||||
import { resolveApiErrorMessage } from '@/utils/api-error'
|
||||
import { pathSegments, joinPath } from './utils'
|
||||
import FileList from './file-list.vue'
|
||||
|
||||
@@ -54,7 +54,7 @@ import {
|
||||
DialogTitle,
|
||||
DialogTrigger,
|
||||
Spinner
|
||||
} from '@memoh/ui'
|
||||
} from '@memohai/ui'
|
||||
|
||||
|
||||
withDefaults(defineProps<{
|
||||
|
||||
@@ -31,9 +31,9 @@
|
||||
import { ref } from 'vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { useMutation, useQueryCache } from '@pinia/colada'
|
||||
import { postProvidersByIdImportModels } from '@memoh/sdk'
|
||||
import { postProvidersByIdImportModels } from '@memohai/sdk'
|
||||
import { toast } from 'vue-sonner'
|
||||
import { Button } from '@memoh/ui'
|
||||
import { Button } from '@memohai/ui'
|
||||
import FormDialogShell from '@/components/form-dialog-shell/index.vue'
|
||||
import { useDialogMutation } from '@/composables/useDialogMutation'
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { Button, Input } from '@memoh/ui'
|
||||
import { Button, Input } from '@memohai/ui'
|
||||
|
||||
export interface KeyValuePair {
|
||||
key: string
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { Button, Spinner } from '@memoh/ui'
|
||||
import type { ButtonVariants } from '@memoh/ui'
|
||||
import { Button, Spinner } from '@memohai/ui'
|
||||
import type { ButtonVariants } from '@memohai/ui'
|
||||
|
||||
defineOptions({ inheritAttrs: false })
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ import {
|
||||
BreadcrumbSeparator,
|
||||
Separator,
|
||||
ScrollArea,
|
||||
} from '@memoh/ui'
|
||||
} from '@memohai/ui'
|
||||
import { useRoute } from 'vue-router'
|
||||
import { computed, unref } from 'vue'
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ import {
|
||||
SidebarFooter,
|
||||
SidebarHeader,
|
||||
SidebarProvider,
|
||||
} from '@memoh/ui'
|
||||
} from '@memohai/ui'
|
||||
|
||||
const mobileOpen = ref(false)
|
||||
</script>
|
||||
|
||||
@@ -65,10 +65,10 @@ import {
|
||||
YiColor,
|
||||
Zhipu,
|
||||
ZhipuColor,
|
||||
} from '@memoh/icon'
|
||||
} from '@memohai/icon'
|
||||
|
||||
/**
|
||||
* Maps preset icon names (stored in DB) to @memoh/icon Vue components.
|
||||
* Maps preset icon names (stored in DB) to @memohai/icon Vue components.
|
||||
* The key is the SVG filename without extension (e.g. 'openai', 'deepseek-color').
|
||||
*/
|
||||
export const iconMap: Record<string, Component> = {
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
:class="containerClass"
|
||||
>
|
||||
<component
|
||||
v-if="iconComponent"
|
||||
:is="iconComponent"
|
||||
v-if="iconComponent"
|
||||
:size="iconSize"
|
||||
/>
|
||||
<FontAwesomeIcon
|
||||
@@ -35,7 +35,7 @@ import {
|
||||
Searxng,
|
||||
Sogou,
|
||||
Serper,
|
||||
} from '@memoh/icon'
|
||||
} from '@memohai/icon'
|
||||
|
||||
const searchIcons: Record<string, Component> = {
|
||||
brave: Brave,
|
||||
|
||||
@@ -123,7 +123,7 @@ import {
|
||||
PopoverTrigger,
|
||||
PopoverContent,
|
||||
Button,
|
||||
} from '@memoh/ui'
|
||||
} from '@memohai/ui'
|
||||
import { computed, ref, watch } from 'vue'
|
||||
|
||||
export interface SearchableSelectOption {
|
||||
|
||||
@@ -81,7 +81,7 @@ import {
|
||||
SidebarMenu,
|
||||
SidebarMenuButton,
|
||||
SidebarMenuItem,
|
||||
} from '@memoh/ui'
|
||||
} from '@memohai/ui'
|
||||
import { computed } from 'vue'
|
||||
import { useRouter, useRoute } from 'vue-router'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
|
||||
@@ -5,7 +5,7 @@ import {
|
||||
postBotsByBotIdSessions,
|
||||
deleteBotsByBotIdSessionsBySessionId,
|
||||
patchBotsByBotIdSessionsBySessionId,
|
||||
} from '@memoh/sdk'
|
||||
} from '@memohai/sdk'
|
||||
import type { Bot, SessionSummary } from './useChat.types'
|
||||
|
||||
export async function fetchBots(): Promise<Bot[]> {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { client } from '@memoh/sdk/client'
|
||||
import { getBotsByBotIdMessages, postBotsByBotIdWebMessages } from '@memoh/sdk'
|
||||
import type { ChannelAttachment, ChannelMessage } from '@memoh/sdk'
|
||||
import { client } from '@memohai/sdk/client'
|
||||
import { getBotsByBotIdMessages, postBotsByBotIdWebMessages } from '@memohai/sdk'
|
||||
import type { ChannelAttachment, ChannelMessage } from '@memohai/sdk'
|
||||
import type {
|
||||
ChatAttachment,
|
||||
FetchMessagesOptions,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { BotsBot } from '@memoh/sdk'
|
||||
import type { BotsBot } from '@memohai/sdk'
|
||||
|
||||
export type Bot = BotsBot
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { client } from '@memoh/sdk/client'
|
||||
import { client } from '@memohai/sdk/client'
|
||||
import type { StreamEvent, MessageStreamEvent, ChatAttachment, StreamEventHandler } from './useChat.types'
|
||||
|
||||
export interface WSClientMessage {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { client } from '@memoh/sdk/client'
|
||||
import type { Options } from '@memoh/sdk'
|
||||
import { client } from '@memohai/sdk/client'
|
||||
import type { Options } from '@memohai/sdk'
|
||||
import type {
|
||||
HandlersCreateContainerResponse,
|
||||
PostBotsByBotIdContainerData,
|
||||
} from '@memoh/sdk'
|
||||
} from '@memohai/sdk'
|
||||
|
||||
export type ContainerCreateLayerStatus = {
|
||||
ref: string
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { client } from '@memoh/sdk/client'
|
||||
import { client } from '@memohai/sdk/client'
|
||||
import { useQuery, useMutation, useQueryCache } from '@pinia/colada'
|
||||
|
||||
// ---- Types ----
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
</section>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { SidebarProvider } from '@memoh/ui'
|
||||
import { SidebarProvider } from '@memohai/ui'
|
||||
|
||||
const sidebarDefaultOpen = document.cookie.includes('sidebar_state=true')
|
||||
</script>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { client } from '@memoh/sdk/client'
|
||||
import { client } from '@memohai/sdk/client'
|
||||
import router from '@/router'
|
||||
|
||||
/**
|
||||
|
||||
@@ -648,7 +648,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed, reactive, ref, watch } from 'vue'
|
||||
import { Avatar, AvatarFallback, AvatarImage, Button, Input, Label, NativeSelect, Separator, Spinner, Switch } from '@memoh/ui'
|
||||
import { Avatar, AvatarFallback, AvatarImage, Button, Input, Label, NativeSelect, Separator, Spinner, Switch } from '@memohai/ui'
|
||||
import { useQuery, useMutation, useQueryCache } from '@pinia/colada'
|
||||
import { toast } from 'vue-sonner'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
@@ -664,7 +664,7 @@ import {
|
||||
putBotsByBotIdBlacklist,
|
||||
putBotsByBotIdSettings,
|
||||
putBotsByBotIdWhitelist,
|
||||
} from '@memoh/sdk'
|
||||
} from '@memohai/sdk'
|
||||
import type {
|
||||
AclChannelIdentityCandidate,
|
||||
AclObservedConversationCandidate,
|
||||
@@ -672,7 +672,7 @@ import type {
|
||||
AclSourceScope,
|
||||
AclUpsertRuleRequest,
|
||||
AclUserCandidate,
|
||||
} from '@memoh/sdk'
|
||||
} from '@memohai/sdk'
|
||||
import SearchableSelectPopover from '@/components/searchable-select-popover/index.vue'
|
||||
import type { SearchableSelectOption } from '@/components/searchable-select-popover/index.vue'
|
||||
import { resolveApiErrorMessage } from '@/utils/api-error'
|
||||
|
||||
@@ -58,11 +58,11 @@ import {
|
||||
AvatarImage,
|
||||
AvatarFallback,
|
||||
Badge,
|
||||
} from '@memoh/ui'
|
||||
} from '@memohai/ui'
|
||||
import { computed } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import type { BotsBot } from '@memoh/sdk'
|
||||
import type { BotsBot } from '@memohai/sdk'
|
||||
import { formatDate } from '@/utils/date-time'
|
||||
import { useAvatarInitials } from '@/composables/useAvatarInitials'
|
||||
import { useBotStatusMeta } from '@/composables/useBotStatusMeta'
|
||||
|
||||
@@ -42,7 +42,10 @@
|
||||
@click="selectedType = item.meta.type ?? ''"
|
||||
>
|
||||
<span class="flex size-8 shrink-0 items-center justify-center rounded-full bg-muted text-muted-foreground">
|
||||
<ChannelIcon :channel="item.meta.type as string" size="1.25em" />
|
||||
<ChannelIcon
|
||||
:channel="item.meta.type as string"
|
||||
size="1.25em"
|
||||
/>
|
||||
</span>
|
||||
<div class="flex-1 text-left">
|
||||
<div class="font-medium">
|
||||
@@ -101,7 +104,10 @@
|
||||
@click="addChannel(item.meta.type ?? '')"
|
||||
>
|
||||
<span class="flex size-7 shrink-0 items-center justify-center rounded-full bg-muted text-muted-foreground">
|
||||
<ChannelIcon :channel="item.meta.type" size="1em" />
|
||||
<ChannelIcon
|
||||
:channel="item.meta.type"
|
||||
size="1em"
|
||||
/>
|
||||
</span>
|
||||
<span>{{ item.meta.display_name }}</span>
|
||||
</button>
|
||||
@@ -137,10 +143,10 @@ import {
|
||||
PopoverTrigger,
|
||||
PopoverContent,
|
||||
ScrollArea
|
||||
} from '@memoh/ui'
|
||||
} from '@memohai/ui'
|
||||
import { useQuery } from '@pinia/colada'
|
||||
import { getChannels, getBotsByIdChannelByPlatform } from '@memoh/sdk'
|
||||
import type { HandlersChannelMeta, ChannelChannelConfig } from '@memoh/sdk'
|
||||
import { getChannels, getBotsByIdChannelByPlatform } from '@memohai/sdk'
|
||||
import type { HandlersChannelMeta, ChannelChannelConfig } from '@memohai/sdk'
|
||||
import ChannelSettingsPanel from './channel-settings-panel.vue'
|
||||
import ChannelIcon from '@/components/channel-icon/index.vue'
|
||||
|
||||
|
||||
@@ -236,15 +236,15 @@ import { useI18n } from 'vue-i18n'
|
||||
import { toast } from 'vue-sonner'
|
||||
import {
|
||||
Button, Badge, Spinner, NativeSelect, Label, Switch, Input, Separator,
|
||||
} from '@memoh/ui'
|
||||
} from '@memohai/ui'
|
||||
import ConfirmPopover from '@/components/confirm-popover/index.vue'
|
||||
import ModelSelect from './model-select.vue'
|
||||
import {
|
||||
getBotsByBotIdSettings, putBotsByBotIdSettings,
|
||||
getBotsByBotIdCompactionLogs, deleteBotsByBotIdCompactionLogs,
|
||||
getModels, getProviders,
|
||||
} from '@memoh/sdk'
|
||||
import type { SettingsSettings, SettingsUpsertRequest, CompactionLog } from '@memoh/sdk'
|
||||
} from '@memohai/sdk'
|
||||
import type { SettingsSettings, SettingsUpsertRequest, CompactionLog } from '@memohai/sdk'
|
||||
import { useQuery, useMutation, useQueryCache } from '@pinia/colada'
|
||||
import { resolveApiErrorMessage } from '@/utils/api-error'
|
||||
import { formatDateTime } from '@/utils/date-time'
|
||||
|
||||
@@ -19,13 +19,13 @@ import {
|
||||
type HandlersCreateContainerRequest,
|
||||
type HandlersGetContainerResponse,
|
||||
type HandlersListSnapshotsResponse,
|
||||
} from '@memoh/sdk'
|
||||
} from '@memohai/sdk'
|
||||
import {
|
||||
postBotsByBotIdContainerStream,
|
||||
type ContainerCreateLayerStatus,
|
||||
type ContainerCreateStreamEvent,
|
||||
} from '@/composables/api/useContainerStream'
|
||||
import { Button, Input, Label, Separator, Spinner, Switch } from '@memoh/ui'
|
||||
import { Button, Input, Label, Separator, Spinner, Switch } from '@memohai/ui'
|
||||
import ConfirmPopover from '@/components/confirm-popover/index.vue'
|
||||
import ContainerCreateProgress from './container-create-progress.vue'
|
||||
import { useSyncedQueryParam } from '@/composables/useSyncedQueryParam'
|
||||
|
||||
@@ -209,7 +209,7 @@ import {
|
||||
Separator,
|
||||
Spinner,
|
||||
Switch,
|
||||
} from '@memoh/ui'
|
||||
} from '@memohai/ui'
|
||||
import ConfirmPopover from '@/components/confirm-popover/index.vue'
|
||||
import { computed, ref, watch } from 'vue'
|
||||
import { toast } from 'vue-sonner'
|
||||
@@ -221,8 +221,8 @@ import {
|
||||
putBotsByBotIdEmailBindingsById,
|
||||
deleteBotsByBotIdEmailBindingsById,
|
||||
getBotsByBotIdEmailOutbox,
|
||||
} from '@memoh/sdk'
|
||||
import type { EmailProviderResponse, EmailBindingResponse, EmailOutboxItemResponse } from '@memoh/sdk'
|
||||
} from '@memohai/sdk'
|
||||
import type { EmailProviderResponse, EmailBindingResponse, EmailOutboxItemResponse } from '@memohai/sdk'
|
||||
import { formatDateTime } from '@/utils/date-time'
|
||||
|
||||
const props = defineProps<{ botId: string }>()
|
||||
|
||||
@@ -240,15 +240,15 @@ import { useI18n } from 'vue-i18n'
|
||||
import { toast } from 'vue-sonner'
|
||||
import {
|
||||
Button, Badge, Spinner, NativeSelect, Label, Switch, Input, Separator,
|
||||
} from '@memoh/ui'
|
||||
} from '@memohai/ui'
|
||||
import ConfirmPopover from '@/components/confirm-popover/index.vue'
|
||||
import ModelSelect from './model-select.vue'
|
||||
import {
|
||||
getBotsByBotIdSettings, putBotsByBotIdSettings,
|
||||
getBotsByBotIdHeartbeatLogs, deleteBotsByBotIdHeartbeatLogs,
|
||||
getModels, getProviders,
|
||||
} from '@memoh/sdk'
|
||||
import type { SettingsSettings, SettingsUpsertRequest, HeartbeatLog } from '@memoh/sdk'
|
||||
} from '@memohai/sdk'
|
||||
import type { SettingsSettings, SettingsUpsertRequest, HeartbeatLog } from '@memohai/sdk'
|
||||
import { useQuery, useMutation, useQueryCache } from '@pinia/colada'
|
||||
import { resolveApiErrorMessage } from '@/utils/api-error'
|
||||
import { formatDateTime } from '@/utils/date-time'
|
||||
|
||||
@@ -681,7 +681,7 @@ import {
|
||||
TagsInputItemDelete,
|
||||
TagsInputItemText,
|
||||
Toggle,
|
||||
} from '@memoh/ui'
|
||||
} from '@memohai/ui'
|
||||
import MasterDetailSidebarLayout from '@/components/master-detail-sidebar-layout/index.vue'
|
||||
import MonacoEditor from '@/components/monaco-editor/index.vue'
|
||||
import KeyValueEditor from '@/components/key-value-editor/index.vue'
|
||||
@@ -698,14 +698,14 @@ import {
|
||||
postBotsByBotIdMcpByIdOauthDiscover,
|
||||
postBotsByBotIdMcpByIdOauthAuthorize,
|
||||
deleteBotsByBotIdMcpByIdOauthToken,
|
||||
} from '@memoh/sdk'
|
||||
} from '@memohai/sdk'
|
||||
import type {
|
||||
McpUpsertRequest,
|
||||
McpImportRequest,
|
||||
McpToolDescriptor,
|
||||
McpMcpServerEntry,
|
||||
McpOAuthStatus,
|
||||
} from '@memoh/sdk'
|
||||
} from '@memohai/sdk'
|
||||
import { resolveApiErrorMessage } from '@/utils/api-error'
|
||||
import { useClipboard } from '@/composables/useClipboard'
|
||||
|
||||
|
||||
@@ -469,7 +469,7 @@ import {
|
||||
Label,
|
||||
RadioGroup,
|
||||
RadioGroupItem,
|
||||
} from '@memoh/ui'
|
||||
} from '@memohai/ui'
|
||||
import {
|
||||
getBotsByBotIdMemory,
|
||||
getBotsByBotIdMemoryStatus,
|
||||
@@ -478,14 +478,14 @@ import {
|
||||
postBotsByBotIdMemoryCompact,
|
||||
getBotsByBotIdMessages,
|
||||
postBotsByBotIdMemorySearch,
|
||||
} from '@memoh/sdk'
|
||||
} from '@memohai/sdk'
|
||||
import type {
|
||||
AdaptersCdfPoint as MemoryCdfPoint,
|
||||
AdaptersMemoryItem,
|
||||
AdaptersMemoryStatusResponse,
|
||||
AdaptersTopKBucket as MemoryTopKBucket,
|
||||
MessageMessage,
|
||||
} from '@memoh/sdk'
|
||||
} from '@memohai/sdk'
|
||||
import { toast } from 'vue-sonner'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import ConfirmPopover from '@/components/confirm-popover/index.vue'
|
||||
|
||||
@@ -4,14 +4,14 @@ import {
|
||||
type BotsBotCheck,
|
||||
getBotsByIdChecks,
|
||||
getBotsById
|
||||
} from '@memoh/sdk'
|
||||
} from '@memohai/sdk'
|
||||
import { useRoute } from 'vue-router'
|
||||
import { toast } from 'vue-sonner'
|
||||
import { resolveApiErrorMessage } from '@/utils/api-error'
|
||||
import { useBotStatusMeta } from '@/composables/useBotStatusMeta'
|
||||
import { useQuery } from '@pinia/colada'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { Badge,Button,Spinner } from '@memoh/ui'
|
||||
import { Badge,Button,Spinner } from '@memohai/ui'
|
||||
import { useSyncedQueryParam } from '@/composables/useSyncedQueryParam'
|
||||
|
||||
|
||||
|
||||
@@ -167,9 +167,9 @@ import {
|
||||
Pagination, PaginationContent, PaginationEllipsis,
|
||||
PaginationFirst, PaginationItem, PaginationLast,
|
||||
PaginationNext, PaginationPrevious,
|
||||
} from '@memoh/ui'
|
||||
import { getBotsByBotIdSchedule } from '@memoh/sdk'
|
||||
import type { ScheduleSchedule } from '@memoh/sdk'
|
||||
} from '@memohai/ui'
|
||||
import { getBotsByBotIdSchedule } from '@memohai/sdk'
|
||||
import type { ScheduleSchedule } from '@memohai/sdk'
|
||||
import { resolveApiErrorMessage } from '@/utils/api-error'
|
||||
import { formatDateTime } from '@/utils/date-time'
|
||||
|
||||
|
||||
@@ -333,7 +333,7 @@ import {
|
||||
SelectItem,
|
||||
SelectTrigger,
|
||||
SelectValue,
|
||||
} from '@memoh/ui'
|
||||
} from '@memohai/ui'
|
||||
import { reactive, computed, watch } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { toast } from 'vue-sonner'
|
||||
@@ -345,8 +345,8 @@ import MemoryProviderSelect from './memory-provider-select.vue'
|
||||
import TtsModelSelect from './tts-model-select.vue'
|
||||
import BrowserContextSelect from './browser-context-select.vue'
|
||||
import { useQuery, useMutation, useQueryCache } from '@pinia/colada'
|
||||
import { getBotsByBotIdSettings, putBotsByBotIdSettings, deleteBotsById, getModels, getProviders, getSearchProviders, getMemoryProviders, getTtsProviders, getBrowserContexts, getBotsByBotIdMemoryStatus, postBotsByBotIdMemoryRebuild } from '@memoh/sdk'
|
||||
import type { SettingsSettings } from '@memoh/sdk'
|
||||
import { getBotsByBotIdSettings, putBotsByBotIdSettings, deleteBotsById, getModels, getProviders, getSearchProviders, getMemoryProviders, getTtsProviders, getBrowserContexts, getBotsByBotIdMemoryStatus, postBotsByBotIdMemoryRebuild } from '@memohai/sdk'
|
||||
import type { SettingsSettings } from '@memohai/sdk'
|
||||
import type { Ref } from 'vue'
|
||||
import { resolveApiErrorMessage } from '@/utils/api-error'
|
||||
|
||||
|
||||
@@ -156,7 +156,7 @@ import {
|
||||
Button, Card, CardHeader, CardTitle, CardDescription,
|
||||
Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter, DialogClose,
|
||||
Spinner,
|
||||
} from '@memoh/ui'
|
||||
} from '@memohai/ui'
|
||||
import ConfirmPopover from '@/components/confirm-popover/index.vue'
|
||||
import MonacoEditor from '@/components/monaco-editor/index.vue'
|
||||
import {
|
||||
@@ -164,7 +164,7 @@ import {
|
||||
postBotsByBotIdContainerSkills,
|
||||
deleteBotsByBotIdContainerSkills,
|
||||
type HandlersSkillItem,
|
||||
} from '@memoh/sdk'
|
||||
} from '@memohai/sdk'
|
||||
import { resolveApiErrorMessage } from '@/utils/api-error'
|
||||
|
||||
const props = defineProps<{
|
||||
|
||||
@@ -5,8 +5,8 @@ import { useI18n } from 'vue-i18n'
|
||||
import { Terminal } from '@xterm/xterm'
|
||||
import { FitAddon } from '@xterm/addon-fit'
|
||||
import { SerializeAddon } from '@xterm/addon-serialize'
|
||||
import { client } from '@memoh/sdk/client'
|
||||
import { Button } from '@memoh/ui'
|
||||
import { client } from '@memohai/sdk/client'
|
||||
import { Button } from '@memohai/ui'
|
||||
import { useSyncedQueryParam } from '@/composables/useSyncedQueryParam'
|
||||
import { useTerminalCache } from '@/composables/useTerminalCache'
|
||||
import type { TerminalCacheState } from '@/composables/useTerminalCache'
|
||||
|
||||
@@ -52,9 +52,9 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { Button } from '@memoh/ui'
|
||||
import { Button } from '@memohai/ui'
|
||||
import { computed } from 'vue'
|
||||
import type { BrowsercontextsBrowserContext } from '@memoh/sdk'
|
||||
import type { BrowsercontextsBrowserContext } from '@memohai/sdk'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import SearchableSelectPopover from '@/components/searchable-select-popover/index.vue'
|
||||
import type { SearchableSelectOption } from '@/components/searchable-select-popover/index.vue'
|
||||
|
||||
@@ -4,7 +4,10 @@
|
||||
<div class="flex items-center justify-between">
|
||||
<div class="flex items-center gap-3">
|
||||
<span class="flex size-10 shrink-0 items-center justify-center rounded-full bg-muted text-muted-foreground">
|
||||
<ChannelIcon :channel="channelItem.meta.type" size="1.5em" />
|
||||
<ChannelIcon
|
||||
:channel="channelItem.meta.type"
|
||||
size="1.5em"
|
||||
/>
|
||||
</span>
|
||||
<div>
|
||||
<h3 class="text-lg font-semibold">
|
||||
@@ -258,14 +261,14 @@ import {
|
||||
SelectValue,
|
||||
SelectContent,
|
||||
SelectItem,
|
||||
} from '@memoh/ui'
|
||||
} from '@memohai/ui'
|
||||
import { reactive, watch, computed, ref } from 'vue'
|
||||
import { toast } from 'vue-sonner'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { useMutation, useQueryCache } from '@pinia/colada'
|
||||
import { putBotsByIdChannelByPlatform, deleteBotsByIdChannelByPlatform, patchBotsByIdChannelByPlatformStatus } from '@memoh/sdk'
|
||||
import type { HandlersChannelMeta, ChannelChannelConfig, ChannelFieldSchema, ChannelUpsertConfigRequest } from '@memoh/sdk'
|
||||
import { client } from '@memoh/sdk/client'
|
||||
import { putBotsByIdChannelByPlatform, deleteBotsByIdChannelByPlatform, patchBotsByIdChannelByPlatformStatus } from '@memohai/sdk'
|
||||
import type { HandlersChannelMeta, ChannelChannelConfig, ChannelFieldSchema, ChannelUpsertConfigRequest } from '@memohai/sdk'
|
||||
import { client } from '@memohai/sdk/client'
|
||||
import ConfirmPopover from '@/components/confirm-popover/index.vue'
|
||||
import ChannelIcon from '@/components/channel-icon/index.vue'
|
||||
import WeixinQrLogin from './weixin-qr-login.vue'
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { Spinner } from '@memoh/ui'
|
||||
import { Spinner } from '@memohai/ui'
|
||||
|
||||
defineProps<{
|
||||
phase: 'preserving' | 'pulling' | 'creating' | 'restoring' | 'complete' | 'error'
|
||||
|
||||
@@ -99,13 +99,13 @@ import {
|
||||
Separator,
|
||||
Label,
|
||||
Spinner,
|
||||
} from '@memoh/ui'
|
||||
} from '@memohai/ui'
|
||||
import { useForm } from 'vee-validate'
|
||||
import { toTypedSchema } from '@vee-validate/zod'
|
||||
import z from 'zod'
|
||||
import { watch } from 'vue'
|
||||
import { useMutation, useQueryCache } from '@pinia/colada'
|
||||
import { postBotsMutation, getBotsQueryKey } from '@memoh/sdk/colada'
|
||||
import { postBotsMutation, getBotsQueryKey } from '@memohai/sdk/colada'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { useDialogMutation } from '@/composables/useDialogMutation'
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { Button } from '@memoh/ui'
|
||||
import { Button } from '@memohai/ui'
|
||||
import { computed } from 'vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import SearchableSelectPopover from '@/components/searchable-select-popover/index.vue'
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, computed } from 'vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { Badge } from '@memoh/ui'
|
||||
import { Badge } from '@memohai/ui'
|
||||
import { formatDateTime } from '@/utils/date-time'
|
||||
|
||||
export interface MessageItem {
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
import type { ModelsGetResponse, ProvidersGetResponse } from '@memoh/sdk'
|
||||
import type { ModelsGetResponse, ProvidersGetResponse } from '@memohai/sdk'
|
||||
import SearchableSelectPopover from '@/components/searchable-select-popover/index.vue'
|
||||
import type { SearchableSelectOption } from '@/components/searchable-select-popover/index.vue'
|
||||
|
||||
|
||||
@@ -52,9 +52,9 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { Button } from '@memoh/ui'
|
||||
import { Button } from '@memohai/ui'
|
||||
import { computed } from 'vue'
|
||||
import type { SearchprovidersGetResponse } from '@memoh/sdk'
|
||||
import type { SearchprovidersGetResponse } from '@memohai/sdk'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import SearchProviderLogo from '@/components/search-provider-logo/index.vue'
|
||||
import SearchableSelectPopover from '@/components/searchable-select-popover/index.vue'
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { Button } from '@memoh/ui'
|
||||
import { Button } from '@memohai/ui'
|
||||
import { computed } from 'vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import SearchableSelectPopover from '@/components/searchable-select-popover/index.vue'
|
||||
|
||||
@@ -52,9 +52,9 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { Button } from '@memoh/ui'
|
||||
import { Button } from '@memohai/ui'
|
||||
import { computed } from 'vue'
|
||||
import type { TtsProviderResponse } from '@memoh/sdk'
|
||||
import type { TtsProviderResponse } from '@memohai/sdk'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import SearchableSelectPopover from '@/components/searchable-select-popover/index.vue'
|
||||
import type { SearchableSelectOption } from '@/components/searchable-select-popover/index.vue'
|
||||
|
||||
@@ -133,10 +133,10 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, computed, onUnmounted } from 'vue'
|
||||
import { Button, Spinner } from '@memoh/ui'
|
||||
import { Button, Spinner } from '@memohai/ui'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { toast } from 'vue-sonner'
|
||||
import { client } from '@memoh/sdk/client'
|
||||
import { client } from '@memohai/sdk/client'
|
||||
import QRCode from 'qrcode'
|
||||
|
||||
const props = defineProps<{
|
||||
|
||||
@@ -218,7 +218,7 @@ import {
|
||||
SidebarMenuButton,
|
||||
SidebarMenuItem,
|
||||
Toggle
|
||||
} from '@memoh/ui'
|
||||
} from '@memohai/ui'
|
||||
import { computed, ref, watch, onMounted, toValue } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
import { toast } from 'vue-sonner'
|
||||
@@ -229,11 +229,11 @@ import {
|
||||
getBotsByIdChecks,
|
||||
getBotsByBotIdContainer,
|
||||
getBotsByBotIdContainerSnapshots,
|
||||
} from '@memoh/sdk'
|
||||
} from '@memohai/sdk'
|
||||
import type {
|
||||
BotsBotCheck, HandlersGetContainerResponse,
|
||||
HandlersListSnapshotsResponse,
|
||||
} from '@memoh/sdk'
|
||||
} from '@memohai/sdk'
|
||||
import { useCapabilitiesStore } from '@/store/capabilities'
|
||||
import LoadingButton from '@/components/loading-button/index.vue'
|
||||
import BotSettings from './components/bot-settings.vue'
|
||||
|
||||
@@ -60,12 +60,12 @@ import {
|
||||
EmptyHeader,
|
||||
EmptyMedia,
|
||||
EmptyTitle,
|
||||
} from '@memoh/ui'
|
||||
} from '@memohai/ui'
|
||||
import { ref, computed, watch, onUnmounted } from 'vue'
|
||||
import BotCard from './components/bot-card.vue'
|
||||
import CreateBot from './components/create-bot.vue'
|
||||
import { useQuery, useQueryCache } from '@pinia/colada'
|
||||
import { getBotsQuery, getBotsQueryKey } from '@memoh/sdk/colada'
|
||||
import { getBotsQuery, getBotsQueryKey } from '@memohai/sdk/colada'
|
||||
|
||||
const searchText = ref('')
|
||||
const dialogOpen = ref(false)
|
||||
|
||||
@@ -54,13 +54,13 @@ import {
|
||||
FormControl,
|
||||
FormItem,
|
||||
Label,
|
||||
} from '@memoh/ui'
|
||||
} from '@memohai/ui'
|
||||
import { toTypedSchema } from '@vee-validate/zod'
|
||||
import z from 'zod'
|
||||
import { useForm } from 'vee-validate'
|
||||
import { useMutation, useQueryCache } from '@pinia/colada'
|
||||
import { postBrowserContexts } from '@memoh/sdk'
|
||||
import type { BrowsercontextsCreateRequest } from '@memoh/sdk'
|
||||
import { postBrowserContexts } from '@memohai/sdk'
|
||||
import type { BrowsercontextsCreateRequest } from '@memohai/sdk'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import FormDialogShell from '@/components/form-dialog-shell/index.vue'
|
||||
import { useDialogMutation } from '@/composables/useDialogMutation'
|
||||
|
||||
@@ -233,14 +233,14 @@ import {
|
||||
Separator,
|
||||
Button,
|
||||
Switch,
|
||||
} from '@memoh/ui'
|
||||
} from '@memohai/ui'
|
||||
import { toTypedSchema } from '@vee-validate/zod'
|
||||
import z from 'zod'
|
||||
import { useForm } from 'vee-validate'
|
||||
import { useMutation, useQuery, useQueryCache } from '@pinia/colada'
|
||||
import { putBrowserContextsById, deleteBrowserContextsById } from '@memoh/sdk'
|
||||
import { getBrowserContextsCoresQuery } from '@memoh/sdk/colada'
|
||||
import type { BrowsercontextsBrowserContext, BrowsercontextsUpdateRequest } from '@memoh/sdk'
|
||||
import { putBrowserContextsById, deleteBrowserContextsById } from '@memohai/sdk'
|
||||
import { getBrowserContextsCoresQuery } from '@memohai/sdk/colada'
|
||||
import type { BrowsercontextsBrowserContext, BrowsercontextsUpdateRequest } from '@memohai/sdk'
|
||||
import { inject, watch, computed, type Ref } from 'vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { toast } from 'vue-sonner'
|
||||
|
||||
@@ -15,9 +15,9 @@ import {
|
||||
EmptyMedia,
|
||||
EmptyTitle,
|
||||
Button,
|
||||
} from '@memoh/ui'
|
||||
import { getBrowserContexts } from '@memoh/sdk'
|
||||
import type { BrowsercontextsBrowserContext } from '@memoh/sdk'
|
||||
} from '@memohai/ui'
|
||||
import { getBrowserContexts } from '@memohai/sdk'
|
||||
import type { BrowsercontextsBrowserContext } from '@memohai/sdk'
|
||||
import AddBrowserContext from './components/add-browser-context.vue'
|
||||
import ContextSetting from './components/context-setting.vue'
|
||||
import MasterDetailSidebarLayout from '@/components/master-detail-sidebar-layout/index.vue'
|
||||
|
||||
@@ -54,10 +54,10 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
import { Avatar, AvatarImage, AvatarFallback } from '@memoh/ui'
|
||||
import { Avatar, AvatarImage, AvatarFallback } from '@memohai/ui'
|
||||
import { useQuery } from '@pinia/colada'
|
||||
import { getBotsQuery } from '@memoh/sdk/colada'
|
||||
import type { BotsBot } from '@memoh/sdk'
|
||||
import { getBotsQuery } from '@memohai/sdk/colada'
|
||||
import type { BotsBot } from '@memohai/sdk'
|
||||
import { useChatStore } from '@/store/chat-list'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import {
|
||||
@@ -65,7 +65,7 @@ import {
|
||||
SidebarMenu,
|
||||
SidebarMenuButton,
|
||||
SidebarMenuItem,
|
||||
} from '@memoh/ui'
|
||||
} from '@memohai/ui'
|
||||
|
||||
const chatStore = useChatStore()
|
||||
const { currentBotId } = storeToRefs(chatStore)
|
||||
|
||||
@@ -222,7 +222,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, computed, nextTick, onMounted, provide, useTemplateRef, watchEffect} from 'vue'
|
||||
import { ScrollArea, Button, InputGroup, InputGroupAddon, InputGroupTextarea, Sheet, SheetContent, SheetHeader, SheetTitle, SheetDescription } from '@memoh/ui'
|
||||
import { ScrollArea, Button, InputGroup, InputGroupAddon, InputGroupTextarea, Sheet, SheetContent, SheetHeader, SheetTitle, SheetDescription } from '@memohai/ui'
|
||||
import { useChatStore } from '@/store/chat-list'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import MessageItem from './message-item.vue'
|
||||
|
||||
@@ -189,7 +189,7 @@
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
import { formatRelativeTime, formatDateTime } from '@/utils/date-time'
|
||||
import { Avatar, AvatarImage, AvatarFallback } from '@memoh/ui'
|
||||
import { Avatar, AvatarImage, AvatarFallback } from '@memohai/ui'
|
||||
import MarkdownRender, { enableKatex, enableMermaid } from 'markstream-vue'
|
||||
import ThinkingBlock from './thinking-block.vue'
|
||||
import ToolCallBlock from './tool-call-block.vue'
|
||||
|
||||
@@ -117,7 +117,7 @@ import { storeToRefs } from 'pinia'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { useChatStore } from '@/store/chat-list'
|
||||
import type { SessionSummary } from '@/composables/api/useChat'
|
||||
import { Avatar, AvatarImage, AvatarFallback } from '@memoh/ui'
|
||||
import { Avatar, AvatarImage, AvatarFallback } from '@memohai/ui'
|
||||
import ChannelBadge from '@/components/chat-list/channel-badge/index.vue'
|
||||
import {
|
||||
Toggle,
|
||||
@@ -128,7 +128,7 @@ import {
|
||||
DropdownMenuTrigger,
|
||||
DropdownMenuContent,
|
||||
DropdownMenuItem,
|
||||
} from '@memoh/ui'
|
||||
} from '@memohai/ui'
|
||||
|
||||
const { t } = useI18n()
|
||||
const chatStore = useChatStore()
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
import { Collapsible, CollapsibleTrigger, CollapsibleContent } from '@memoh/ui'
|
||||
import { Collapsible, CollapsibleTrigger, CollapsibleContent } from '@memohai/ui'
|
||||
import type { ThinkingBlock } from '@/store/chat-list'
|
||||
|
||||
defineProps<{
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, computed } from 'vue'
|
||||
import { Badge, Collapsible, CollapsibleTrigger, CollapsibleContent } from '@memoh/ui'
|
||||
import { Badge, Collapsible, CollapsibleTrigger, CollapsibleContent } from '@memohai/ui'
|
||||
import type { ToolCallBlock } from '@/store/chat-list'
|
||||
|
||||
const props = defineProps<{ block: ToolCallBlock }>()
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, computed } from 'vue'
|
||||
import { Badge, Collapsible, CollapsibleTrigger, CollapsibleContent } from '@memoh/ui'
|
||||
import { Badge, Collapsible, CollapsibleTrigger, CollapsibleContent } from '@memohai/ui'
|
||||
import type { ToolCallBlock } from '@/store/chat-list'
|
||||
|
||||
interface Contact {
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, computed, inject, watch } from 'vue'
|
||||
import { Badge, Collapsible, CollapsibleTrigger, CollapsibleContent } from '@memoh/ui'
|
||||
import { Badge, Collapsible, CollapsibleTrigger, CollapsibleContent } from '@memohai/ui'
|
||||
import type { ToolCallBlock } from '@/store/chat-list'
|
||||
import { openInFileManagerKey } from '../composables/useFileManagerProvider'
|
||||
import { useShikiHighlighter, extractFilename } from '@/composables/useShikiHighlighter'
|
||||
|
||||
@@ -131,7 +131,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, computed } from 'vue'
|
||||
import { Badge, Collapsible, CollapsibleTrigger, CollapsibleContent } from '@memoh/ui'
|
||||
import { Badge, Collapsible, CollapsibleTrigger, CollapsibleContent } from '@memohai/ui'
|
||||
import type { ToolCallBlock } from '@/store/chat-list'
|
||||
|
||||
interface EmailItem {
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, computed } from 'vue'
|
||||
import { Badge, Collapsible, CollapsibleTrigger, CollapsibleContent } from '@memoh/ui'
|
||||
import { Badge, Collapsible, CollapsibleTrigger, CollapsibleContent } from '@memohai/ui'
|
||||
import type { ToolCallBlock } from '@/store/chat-list'
|
||||
|
||||
const props = defineProps<{ block: ToolCallBlock }>()
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
import { Badge, Collapsible, CollapsibleTrigger, CollapsibleContent } from '@memoh/ui'
|
||||
import { Badge, Collapsible, CollapsibleTrigger, CollapsibleContent } from '@memohai/ui'
|
||||
import type { ToolCallBlock } from '@/store/chat-list'
|
||||
|
||||
defineProps<{
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed, inject } from 'vue'
|
||||
import { Badge } from '@memoh/ui'
|
||||
import { Badge } from '@memohai/ui'
|
||||
import type { ToolCallBlock } from '@/store/chat-list'
|
||||
import { openInFileManagerKey } from '../composables/useFileManagerProvider'
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, computed } from 'vue'
|
||||
import { Badge, Collapsible, CollapsibleTrigger, CollapsibleContent } from '@memoh/ui'
|
||||
import { Badge, Collapsible, CollapsibleTrigger, CollapsibleContent } from '@memohai/ui'
|
||||
import type { ToolCallBlock } from '@/store/chat-list'
|
||||
|
||||
interface MemoryResult {
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
import { Badge } from '@memoh/ui'
|
||||
import { Badge } from '@memohai/ui'
|
||||
import type { ToolCallBlock } from '@/store/chat-list'
|
||||
|
||||
const props = defineProps<{ block: ToolCallBlock }>()
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed, inject } from 'vue'
|
||||
import { Badge } from '@memoh/ui'
|
||||
import { Badge } from '@memohai/ui'
|
||||
import type { ToolCallBlock } from '@/store/chat-list'
|
||||
import { openInFileManagerKey } from '../composables/useFileManagerProvider'
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
import { Badge } from '@memoh/ui'
|
||||
import { Badge } from '@memohai/ui'
|
||||
import type { ToolCallBlock } from '@/store/chat-list'
|
||||
|
||||
const props = defineProps<{ block: ToolCallBlock }>()
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
import { Badge } from '@memoh/ui'
|
||||
import { Badge } from '@memohai/ui'
|
||||
import type { ToolCallBlock } from '@/store/chat-list'
|
||||
|
||||
const props = defineProps<{ block: ToolCallBlock }>()
|
||||
|
||||
@@ -106,7 +106,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, computed } from 'vue'
|
||||
import { Badge, Collapsible, CollapsibleTrigger, CollapsibleContent } from '@memoh/ui'
|
||||
import { Badge, Collapsible, CollapsibleTrigger, CollapsibleContent } from '@memohai/ui'
|
||||
import type { ToolCallBlock } from '@/store/chat-list'
|
||||
|
||||
interface SpawnTaskResult {
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, computed } from 'vue'
|
||||
import { Badge, Collapsible, CollapsibleTrigger, CollapsibleContent } from '@memoh/ui'
|
||||
import { Badge, Collapsible, CollapsibleTrigger, CollapsibleContent } from '@memohai/ui'
|
||||
import type { ToolCallBlock } from '@/store/chat-list'
|
||||
|
||||
const props = defineProps<{ block: ToolCallBlock }>()
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, computed } from 'vue'
|
||||
import { Badge, Collapsible, CollapsibleTrigger, CollapsibleContent } from '@memoh/ui'
|
||||
import { Badge, Collapsible, CollapsibleTrigger, CollapsibleContent } from '@memohai/ui'
|
||||
import type { ToolCallBlock } from '@/store/chat-list'
|
||||
|
||||
interface SearchResult {
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, computed, inject, watch } from 'vue'
|
||||
import { Badge, Collapsible, CollapsibleTrigger, CollapsibleContent } from '@memoh/ui'
|
||||
import { Badge, Collapsible, CollapsibleTrigger, CollapsibleContent } from '@memohai/ui'
|
||||
import type { ToolCallBlock } from '@/store/chat-list'
|
||||
import { openInFileManagerKey } from '../composables/useFileManagerProvider'
|
||||
import { useShikiHighlighter, extractFilename } from '@/composables/useShikiHighlighter'
|
||||
|
||||
@@ -91,13 +91,13 @@ import {
|
||||
SelectGroup,
|
||||
SelectItem,
|
||||
Label,
|
||||
} from '@memoh/ui'
|
||||
} from '@memohai/ui'
|
||||
import { toTypedSchema } from '@vee-validate/zod'
|
||||
import z from 'zod'
|
||||
import { useForm } from 'vee-validate'
|
||||
import { useMutation, useQuery, useQueryCache } from '@pinia/colada'
|
||||
import { postEmailProviders, getEmailProvidersMeta } from '@memoh/sdk'
|
||||
import type { EmailCreateProviderRequest } from '@memoh/sdk'
|
||||
import { postEmailProviders, getEmailProvidersMeta } from '@memohai/sdk'
|
||||
import type { EmailCreateProviderRequest } from '@memohai/sdk'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import FormDialogShell from '@/components/form-dialog-shell/index.vue'
|
||||
import { useDialogMutation } from '@/composables/useDialogMutation'
|
||||
|
||||
@@ -230,7 +230,7 @@ import {
|
||||
SelectItem,
|
||||
Switch,
|
||||
Label,
|
||||
} from '@memoh/ui'
|
||||
} from '@memohai/ui'
|
||||
import ConfirmPopover from '@/components/confirm-popover/index.vue'
|
||||
import LoadingButton from '@/components/loading-button/index.vue'
|
||||
import { computed, inject, reactive, ref, watch } from 'vue'
|
||||
@@ -247,8 +247,8 @@ import {
|
||||
getEmailProvidersByIdOauthAuthorize,
|
||||
getEmailProvidersByIdOauthStatus,
|
||||
deleteEmailProvidersByIdOauthToken,
|
||||
} from '@memoh/sdk'
|
||||
import type { EmailProviderResponse, EmailProviderMeta, EmailFieldSchema, HandlersEmailOAuthStatusResponse } from '@memoh/sdk'
|
||||
} from '@memohai/sdk'
|
||||
import type { EmailProviderResponse, EmailProviderMeta, EmailFieldSchema, HandlersEmailOAuthStatusResponse } from '@memohai/sdk'
|
||||
|
||||
const OAUTH_PROVIDERS = ['gmail']
|
||||
|
||||
|
||||
@@ -15,9 +15,9 @@ import {
|
||||
EmptyHeader,
|
||||
EmptyMedia,
|
||||
EmptyTitle,
|
||||
} from '@memoh/ui'
|
||||
import { getEmailProviders } from '@memoh/sdk'
|
||||
import type { EmailProviderResponse } from '@memoh/sdk'
|
||||
} from '@memohai/ui'
|
||||
import { getEmailProviders } from '@memohai/sdk'
|
||||
import type { EmailProviderResponse } from '@memohai/sdk'
|
||||
import AddEmailProvider from './components/add-email-provider.vue'
|
||||
import ProviderSetting from './components/provider-setting.vue'
|
||||
import MasterDetailSidebarLayout from '@/components/master-detail-sidebar-layout/index.vue'
|
||||
|
||||
@@ -140,7 +140,7 @@ import {
|
||||
SelectItem,
|
||||
SelectTrigger,
|
||||
SelectValue,
|
||||
} from '@memoh/ui'
|
||||
} from '@memohai/ui'
|
||||
import { Sun, Moon } from 'lucide-vue-next'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { toTypedSchema } from '@vee-validate/zod'
|
||||
@@ -152,7 +152,7 @@ import { ref } from 'vue'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { toast } from 'vue-sonner'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { postAuthLogin } from '@memoh/sdk'
|
||||
import { postAuthLogin } from '@memohai/sdk'
|
||||
import type { Locale } from '@/i18n'
|
||||
|
||||
const router = useRouter()
|
||||
|
||||
@@ -87,9 +87,9 @@ import {
|
||||
SelectContent,
|
||||
SelectGroup,
|
||||
SelectItem,
|
||||
} from '@memoh/ui'
|
||||
import { postMemoryProviders } from '@memoh/sdk'
|
||||
import type { AdaptersProviderType } from '@memoh/sdk'
|
||||
} from '@memohai/ui'
|
||||
import { postMemoryProviders } from '@memohai/sdk'
|
||||
import type { AdaptersProviderType } from '@memohai/sdk'
|
||||
import { toast } from 'vue-sonner'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { useQueryCache } from '@pinia/colada'
|
||||
|
||||
@@ -230,10 +230,10 @@ import {
|
||||
Label,
|
||||
Separator,
|
||||
Spinner,
|
||||
} from '@memoh/ui'
|
||||
} from '@memohai/ui'
|
||||
import { useQuery, useQueryCache } from '@pinia/colada'
|
||||
import { getModels, getProviders, getMemoryProvidersMeta, getMemoryProvidersByIdStatus, putMemoryProvidersById, deleteMemoryProvidersById } from '@memoh/sdk'
|
||||
import type { AdaptersProviderGetResponse, AdaptersProviderMeta, AdaptersProviderStatusResponse } from '@memoh/sdk'
|
||||
import { getModels, getProviders, getMemoryProvidersMeta, getMemoryProvidersByIdStatus, putMemoryProvidersById, deleteMemoryProvidersById } from '@memohai/sdk'
|
||||
import type { AdaptersProviderGetResponse, AdaptersProviderMeta, AdaptersProviderStatusResponse } from '@memohai/sdk'
|
||||
import { toast } from 'vue-sonner'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import ConfirmPopover from '@/components/confirm-popover/index.vue'
|
||||
|
||||
@@ -15,9 +15,9 @@ import {
|
||||
EmptyMedia,
|
||||
EmptyTitle,
|
||||
Button
|
||||
} from '@memoh/ui'
|
||||
import { getMemoryProviders } from '@memoh/sdk'
|
||||
import type { MemoryprovidersGetResponse } from '@memoh/sdk'
|
||||
} from '@memohai/ui'
|
||||
import { getMemoryProviders } from '@memohai/sdk'
|
||||
import type { MemoryprovidersGetResponse } from '@memohai/sdk'
|
||||
import AddMemoryProvider from './components/add-memory-provider.vue'
|
||||
import ProviderSetting from './components/provider-setting.vue'
|
||||
import MasterDetailSidebarLayout from '@/components/master-detail-sidebar-layout/index.vue'
|
||||
|
||||
@@ -95,10 +95,10 @@ import {
|
||||
Badge,
|
||||
Button,
|
||||
Spinner,
|
||||
} from '@memoh/ui'
|
||||
} from '@memohai/ui'
|
||||
import ConfirmPopover from '@/components/confirm-popover/index.vue'
|
||||
import { postModelsByIdTest } from '@memoh/sdk'
|
||||
import type { ModelsGetResponse, ModelsTestResponse } from '@memoh/sdk'
|
||||
import { postModelsByIdTest } from '@memohai/sdk'
|
||||
import type { ModelsGetResponse, ModelsTestResponse } from '@memohai/sdk'
|
||||
import { ref, computed } from 'vue'
|
||||
|
||||
const props = defineProps<{
|
||||
|
||||
@@ -100,11 +100,11 @@ import {
|
||||
InputGroup,
|
||||
InputGroupAddon,
|
||||
InputGroupInput,
|
||||
} from '@memoh/ui'
|
||||
} from '@memohai/ui'
|
||||
import CreateModel from '@/components/create-model/index.vue'
|
||||
import ImportModelsDialog from '@/components/import-models-dialog/index.vue'
|
||||
import ModelItem from './model-item.vue'
|
||||
import type { ModelsGetResponse } from '@memoh/sdk'
|
||||
import type { ModelsGetResponse } from '@memohai/sdk'
|
||||
|
||||
const PAGE_SIZE = 30
|
||||
|
||||
|
||||
@@ -193,7 +193,7 @@ import {
|
||||
FormItem,
|
||||
Label,
|
||||
Switch,
|
||||
} from '@memoh/ui'
|
||||
} from '@memohai/ui'
|
||||
import ConfirmPopover from '@/components/confirm-popover/index.vue'
|
||||
import StatusDot from '@/components/status-dot/index.vue'
|
||||
import LoadingButton from '@/components/loading-button/index.vue'
|
||||
@@ -203,8 +203,8 @@ import { computed, ref, watch } from 'vue'
|
||||
import { toTypedSchema } from '@vee-validate/zod'
|
||||
import z from 'zod'
|
||||
import { useForm } from 'vee-validate'
|
||||
import { postProvidersByIdTest } from '@memoh/sdk'
|
||||
import type { ProvidersGetResponse, ProvidersTestResponse } from '@memoh/sdk'
|
||||
import { postProvidersByIdTest } from '@memohai/sdk'
|
||||
import type { ProvidersGetResponse, ProvidersTestResponse } from '@memohai/sdk'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
|
||||
const { t } = useI18n()
|
||||
|
||||
@@ -16,9 +16,9 @@ import {
|
||||
EmptyMedia,
|
||||
EmptyTitle,
|
||||
Button,
|
||||
} from '@memoh/ui'
|
||||
import { getProviders } from '@memoh/sdk'
|
||||
import type { ProvidersGetResponse } from '@memoh/sdk'
|
||||
} from '@memohai/ui'
|
||||
import { getProviders } from '@memohai/sdk'
|
||||
import type { ProvidersGetResponse } from '@memohai/sdk'
|
||||
import AddProvider from '@/components/add-provider/index.vue'
|
||||
import ProviderIcon from '@/components/provider-icon/index.vue'
|
||||
import MasterDetailSidebarLayout from '@/components/master-detail-sidebar-layout/index.vue'
|
||||
@@ -135,7 +135,10 @@ const openStatus = reactive({
|
||||
:icon="providerItem.icon"
|
||||
size="1.25em"
|
||||
/>
|
||||
<span v-else class="text-xs font-medium text-muted-foreground">
|
||||
<span
|
||||
v-else
|
||||
class="text-xs font-medium text-muted-foreground"
|
||||
>
|
||||
{{ getInitials(providerItem.name) }}
|
||||
</span>
|
||||
</span>
|
||||
|
||||
@@ -7,7 +7,10 @@
|
||||
:icon="curProvider.icon"
|
||||
size="1.5em"
|
||||
/>
|
||||
<span v-else class="text-sm font-medium text-muted-foreground">
|
||||
<span
|
||||
v-else
|
||||
class="text-sm font-medium text-muted-foreground"
|
||||
>
|
||||
{{ getInitials(curProvider?.name) }}
|
||||
</span>
|
||||
</span>
|
||||
@@ -38,7 +41,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { Separator } from '@memoh/ui'
|
||||
import { Separator } from '@memohai/ui'
|
||||
import ProviderIcon from '@/components/provider-icon/index.vue'
|
||||
|
||||
function getInitials(name: string | undefined) {
|
||||
@@ -49,8 +52,8 @@ import ProviderForm from './components/provider-form.vue'
|
||||
import ModelList from './components/model-list.vue'
|
||||
import { computed, inject, provide, reactive, ref, toRef, watch } from 'vue'
|
||||
import { useQuery, useMutation, useQueryCache } from '@pinia/colada'
|
||||
import { putProvidersById, deleteProvidersById, getProvidersByIdModels, deleteModelsById } from '@memoh/sdk'
|
||||
import type { ModelsGetResponse, ProvidersGetResponse, ProvidersUpdateRequest } from '@memoh/sdk'
|
||||
import { putProvidersById, deleteProvidersById, getProvidersByIdModels, deleteModelsById } from '@memohai/sdk'
|
||||
import type { ModelsGetResponse, ProvidersGetResponse, ProvidersUpdateRequest } from '@memohai/sdk'
|
||||
|
||||
// ---- Model 编辑状态(provide 给 CreateModel) ----
|
||||
const openModel = reactive<{
|
||||
|
||||
@@ -26,8 +26,8 @@
|
||||
import { onMounted, ref } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { Spinner } from '@memoh/ui'
|
||||
import { postBotsByBotIdMcpByIdOauthExchange } from '@memoh/sdk'
|
||||
import { Spinner } from '@memohai/ui'
|
||||
import { postBotsByBotIdMcpByIdOauthExchange } from '@memohai/sdk'
|
||||
|
||||
const route = useRoute()
|
||||
const { t } = useI18n()
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user