Skip to content

Commit 1342dcb

Browse files
committed
fix: i18n & build & MCP prompts
1 parent ed569b6 commit 1342dcb

File tree

9 files changed

+32
-11
lines changed

9 files changed

+32
-11
lines changed

.env

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
DOC_PARSE_BASE_URL=https://aiaw.app/doc-parse
2+
CORS_FETCH_BASE_URL=https://aiaw.app/cors
3+
DEXIE_DB_URL=https://znfeknvy1.dexie.cloud
4+
LITELLM_BASE_URL=https://aiaw.app/api
5+
BUDGET_BASE_URL=https://aiaw.app/budget
6+
SYNC_SERVICE_PRICE=1.8
7+
USD_TO_CNY_RATE=7

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ FROM node:18.20-alpine AS builder
22
WORKDIR /app
33

44
COPY . .
5-
COPY .env.docker .env
5+
COPY .env.docker .env.local
66
RUN apk --no-cache add --virtual .builds-deps build-base python3
77
RUN npm install -g pnpm
88
RUN pnpm install && pnpm build -m pwa

android/app/build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ android {
77
applicationId "app.aiaw"
88
minSdkVersion rootProject.ext.minSdkVersion
99
targetSdkVersion rootProject.ext.targetSdkVersion
10-
versionCode 10402
11-
versionName "Alice-v1.4.2-beta"
10+
versionCode 10403
11+
versionName "Alice-v1.4.3-beta"
1212
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
1313
aaptOptions {
1414
// Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "aiaw",
3-
"version": "1.4.2-beta",
3+
"version": "1.4.3-beta",
44
"description": "精心设计的 AI (LLM) 客户端。全功能,轻量级;支持多工作区、插件系统、跨平台、本地优先+实时云同步",
55
"productName": "AI as Workspace",
66
"author": "NitroRCr <[email protected]>",

src-tauri/tauri.conf.json

+9-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "../node_modules/@tauri-apps/cli/config.schema.json",
33
"productName": "AI as Workspace",
4-
"version": "1.4.2-beta",
4+
"version": "1.4.3-beta",
55
"identifier": "app.aiaw",
66
"build": {
77
"frontendDist": "../dist/spa",
@@ -26,7 +26,14 @@
2626
},
2727
"bundle": {
2828
"active": true,
29-
"targets": "all",
29+
"targets": [
30+
"deb",
31+
"rpm",
32+
"appimage",
33+
"nsis",
34+
"app",
35+
"dmg"
36+
],
3037
"icon": [
3138
"icons/32x32.png",
3239
"icons/128x128.png",

src/i18n/zh-CN/others.ts

+4
Original file line numberDiff line numberDiff line change
@@ -125,5 +125,9 @@ GitHub: <a href="https://github.com/NitroRCr/aiaw" target="_blank">NitroRCr/AIaW
125125
newFolder: '新文件夹',
126126
newWorkspace: '新工作区'
127127
}
128+
},
129+
db: {
130+
exampleWorkspace: '示例工作区',
131+
defaultAssistant: '默认助手'
128132
}
129133
}

src/utils/db.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { Workspace, Folder, Dialog, Message, Assistant, Artifact, StoredReactive
44
import { AssistantDefaultPrompt, ExampleWsIndexContent } from './templates'
55
import dexieCloud, { DexieCloudTable } from 'dexie-cloud-addon'
66
import { DexieDBURL } from './config'
7+
import { i18n } from 'src/boot/i18n'
78

89
type Db = Dexie & {
910
workspaces: DexieCloudTable<Workspace | Folder, 'id'>
@@ -49,13 +50,15 @@ const defaultModelSettings = {
4950
maxRetries: 1
5051
}
5152

53+
const { t } = i18n.global
54+
5255
db.on.populate.subscribe(() => {
5356
db.on.ready.subscribe((db: Db) => {
5457
const initialWorkspaceId = genId()
5558
const initialAssistantId = genId()
5659
db.workspaces.add({
5760
id: initialWorkspaceId,
58-
name: '示例工作区',
61+
name: t('db.exampleWorkspace'),
5962
avatar: { type: 'icon', icon: 'sym_o_menu_book' },
6063
type: 'workspace',
6164
parentId: '$root',
@@ -71,7 +74,7 @@ db.on.populate.subscribe(() => {
7174
} as Workspace)
7275
db.assistants.add({
7376
id: initialAssistantId,
74-
name: '默认助手',
77+
name: t('db.defaultAssistant'),
7578
avatar: defaultAvatar('AI'),
7679
workspaceId: initialWorkspaceId,
7780
prompt: '',

src/utils/plugins.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ function buildMcpPlugin(dump: McpPluginDump, available: boolean): Plugin {
414414
parameters: TObject(params),
415415
async execute(args, settings) {
416416
const client = await getClient(id, { type: transport.type, ...settings })
417-
const res: GetPromptResult = await client.getPrompt(args)
417+
const res: GetPromptResult = await client.getPrompt({ name, arguments: args })
418418
return res.messages.map(m => {
419419
const { content } = m
420420
if (content.type === 'text') {

src/version.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"version": "v1.4.2-beta",
3-
"versionCode": 10402,
2+
"version": "v1.4.3-beta",
3+
"versionCode": 10403,
44
"forceUpdateFrom": 10400,
55
"capChannel": "Alice"
66
}

0 commit comments

Comments
 (0)