Compare commits
10 Commits
v1.7.0-bet
...
copilot/ad
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4269a32cfb | ||
|
|
6493f1853d | ||
|
|
cbd4f418f6 | ||
|
|
7d6ffe472c | ||
|
|
f16b63bd69 | ||
|
|
2552d97ea7 | ||
|
|
803f4b5a64 | ||
|
|
31f8fff6e2 | ||
|
|
2663cb19ce | ||
|
|
ce5d46bfc7 |
@@ -1,5 +1,5 @@
|
||||
diff --git a/dist/index.js b/dist/index.js
|
||||
index 4cc66d83af1cef39f6447dc62e680251e05ddf9f..eb9819cb674c1808845ceb29936196c4bb355172 100644
|
||||
index cac044aab0255fa72f68b36ecd2c5b12d424c379..ad6ee8ecfc5cbc3ec43ba59a44eda21e8e4d353f 100644
|
||||
--- a/dist/index.js
|
||||
+++ b/dist/index.js
|
||||
@@ -471,7 +471,7 @@ function convertToGoogleGenerativeAIMessages(prompt, options) {
|
||||
@@ -12,7 +12,7 @@ index 4cc66d83af1cef39f6447dc62e680251e05ddf9f..eb9819cb674c1808845ceb29936196c4
|
||||
|
||||
// src/google-generative-ai-options.ts
|
||||
diff --git a/dist/index.mjs b/dist/index.mjs
|
||||
index a032505ec54e132dc386dde001dc51f710f84c83..5efada51b9a8b56e3f01b35e734908ebe3c37043 100644
|
||||
index 0793085005d7968638d355f2f1e127939d965165..1c8bf852baf025d56dc35a0691eb95967de7e5c8 100644
|
||||
--- a/dist/index.mjs
|
||||
+++ b/dist/index.mjs
|
||||
@@ -477,7 +477,7 @@ function convertToGoogleGenerativeAIMessages(prompt, options) {
|
||||
@@ -1,5 +1,5 @@
|
||||
diff --git a/dist/index.js b/dist/index.js
|
||||
index cc6652c4e7f32878a64a2614115bf7eeb3b7c890..76e989017549c89b45d633525efb1f318026d9b2 100644
|
||||
index 992c85ac6656e51c3471af741583533c5a7bf79f..83c05952a07aebb95fc6c62f9ddb8aa96b52ac0d 100644
|
||||
--- a/dist/index.js
|
||||
+++ b/dist/index.js
|
||||
@@ -274,6 +274,7 @@ var openaiChatResponseSchema = (0, import_provider_utils3.lazyValidator)(
|
||||
@@ -18,30 +18,29 @@ index cc6652c4e7f32878a64a2614115bf7eeb3b7c890..76e989017549c89b45d633525efb1f31
|
||||
tool_calls: import_v42.z.array(
|
||||
import_v42.z.object({
|
||||
index: import_v42.z.number(),
|
||||
@@ -785,6 +787,14 @@ var OpenAIChatLanguageModel = class {
|
||||
@@ -785,6 +787,13 @@ var OpenAIChatLanguageModel = class {
|
||||
if (text != null && text.length > 0) {
|
||||
content.push({ type: "text", text });
|
||||
}
|
||||
+ const reasoning =
|
||||
+ choice.message.reasoning_content;
|
||||
+ const reasoning = choice.message.reasoning_content;
|
||||
+ if (reasoning != null && reasoning.length > 0) {
|
||||
+ content.push({
|
||||
+ type: 'reasoning',
|
||||
+ text: reasoning,
|
||||
+ text: reasoning
|
||||
+ });
|
||||
+ }
|
||||
for (const toolCall of (_a = choice.message.tool_calls) != null ? _a : []) {
|
||||
content.push({
|
||||
type: "tool-call",
|
||||
@@ -866,6 +876,7 @@ var OpenAIChatLanguageModel = class {
|
||||
@@ -866,6 +875,7 @@ var OpenAIChatLanguageModel = class {
|
||||
};
|
||||
let isFirstChunk = true;
|
||||
let metadataExtracted = false;
|
||||
let isActiveText = false;
|
||||
+ let isActiveReasoning = false;
|
||||
const providerMetadata = { openai: {} };
|
||||
return {
|
||||
stream: response.pipeThrough(
|
||||
@@ -920,6 +931,22 @@ var OpenAIChatLanguageModel = class {
|
||||
@@ -923,6 +933,21 @@ var OpenAIChatLanguageModel = class {
|
||||
return;
|
||||
}
|
||||
const delta = choice.delta;
|
||||
@@ -54,7 +53,6 @@ index cc6652c4e7f32878a64a2614115bf7eeb3b7c890..76e989017549c89b45d633525efb1f31
|
||||
+ });
|
||||
+ isActiveReasoning = true;
|
||||
+ }
|
||||
+
|
||||
+ controller.enqueue({
|
||||
+ type: 'reasoning-delta',
|
||||
+ id: 'reasoning-0',
|
||||
@@ -64,7 +62,7 @@ index cc6652c4e7f32878a64a2614115bf7eeb3b7c890..76e989017549c89b45d633525efb1f31
|
||||
if (delta.content != null) {
|
||||
if (!isActiveText) {
|
||||
controller.enqueue({ type: "text-start", id: "0" });
|
||||
@@ -1032,6 +1059,9 @@ var OpenAIChatLanguageModel = class {
|
||||
@@ -1035,6 +1060,9 @@ var OpenAIChatLanguageModel = class {
|
||||
}
|
||||
},
|
||||
flush(controller) {
|
||||
19
package.json
19
package.json
@@ -106,11 +106,11 @@
|
||||
"@agentic/exa": "^7.3.3",
|
||||
"@agentic/searxng": "^7.3.3",
|
||||
"@agentic/tavily": "^7.3.3",
|
||||
"@ai-sdk/amazon-bedrock": "^3.0.42",
|
||||
"@ai-sdk/google-vertex": "^3.0.48",
|
||||
"@ai-sdk/huggingface": "patch:@ai-sdk/huggingface@npm%3A0.0.4#~/.yarn/patches/@ai-sdk-huggingface-npm-0.0.4-8080836bc1.patch",
|
||||
"@ai-sdk/mistral": "^2.0.19",
|
||||
"@ai-sdk/perplexity": "^2.0.13",
|
||||
"@ai-sdk/amazon-bedrock": "^3.0.53",
|
||||
"@ai-sdk/google-vertex": "^3.0.61",
|
||||
"@ai-sdk/huggingface": "patch:@ai-sdk/huggingface@npm%3A0.0.8#~/.yarn/patches/@ai-sdk-huggingface-npm-0.0.8-d4d0aaac93.patch",
|
||||
"@ai-sdk/mistral": "^2.0.23",
|
||||
"@ai-sdk/perplexity": "^2.0.17",
|
||||
"@ant-design/v5-patch-for-react-19": "^1.0.3",
|
||||
"@anthropic-ai/sdk": "^0.41.0",
|
||||
"@anthropic-ai/vertex-sdk": "patch:@anthropic-ai/vertex-sdk@npm%3A0.11.4#~/.yarn/patches/@anthropic-ai-vertex-sdk-npm-0.11.4-c19cb41edb.patch",
|
||||
@@ -231,7 +231,7 @@
|
||||
"@viz-js/lang-dot": "^1.0.5",
|
||||
"@viz-js/viz": "^3.14.0",
|
||||
"@xyflow/react": "^12.4.4",
|
||||
"ai": "^5.0.76",
|
||||
"ai": "^5.0.90",
|
||||
"antd": "patch:antd@npm%3A5.27.0#~/.yarn/patches/antd-npm-5.27.0-aa91c36546.patch",
|
||||
"archiver": "^7.0.1",
|
||||
"async-mutex": "^0.5.0",
|
||||
@@ -241,7 +241,7 @@
|
||||
"check-disk-space": "3.4.0",
|
||||
"cheerio": "^1.1.2",
|
||||
"chokidar": "^4.0.3",
|
||||
"claude-code-plugins": "1.0.1",
|
||||
"claude-code-plugins": "1.0.3",
|
||||
"cli-progress": "^3.12.0",
|
||||
"clsx": "^2.1.1",
|
||||
"code-inspector-plugin": "^0.20.14",
|
||||
@@ -405,7 +405,10 @@
|
||||
"openai@npm:5.12.2": "npm:@cherrystudio/openai@6.5.0",
|
||||
"@langchain/openai@npm:>=0.1.0 <0.6.0": "patch:@langchain/openai@npm%3A1.0.0#~/.yarn/patches/@langchain-openai-npm-1.0.0-474d0ad9d4.patch",
|
||||
"@langchain/openai@npm:^0.3.16": "patch:@langchain/openai@npm%3A1.0.0#~/.yarn/patches/@langchain-openai-npm-1.0.0-474d0ad9d4.patch",
|
||||
"@langchain/openai@npm:>=0.2.0 <0.7.0": "patch:@langchain/openai@npm%3A1.0.0#~/.yarn/patches/@langchain-openai-npm-1.0.0-474d0ad9d4.patch"
|
||||
"@langchain/openai@npm:>=0.2.0 <0.7.0": "patch:@langchain/openai@npm%3A1.0.0#~/.yarn/patches/@langchain-openai-npm-1.0.0-474d0ad9d4.patch",
|
||||
"@ai-sdk/google@npm:2.0.30": "patch:@ai-sdk/google@npm%3A2.0.30#~/.yarn/patches/@ai-sdk-google-npm-2.0.30-3b31632362.patch",
|
||||
"@ai-sdk/openai@npm:2.0.64": "patch:@ai-sdk/openai@npm%3A2.0.64#~/.yarn/patches/@ai-sdk-openai-npm-2.0.64-48f99f5bf3.patch",
|
||||
"@ai-sdk/openai@npm:^2.0.42": "patch:@ai-sdk/openai@npm%3A2.0.64#~/.yarn/patches/@ai-sdk-openai-npm-2.0.64-48f99f5bf3.patch"
|
||||
},
|
||||
"packageManager": "yarn@4.9.1",
|
||||
"lint-staged": {
|
||||
|
||||
@@ -36,14 +36,14 @@
|
||||
"ai": "^5.0.26"
|
||||
},
|
||||
"dependencies": {
|
||||
"@ai-sdk/anthropic": "^2.0.32",
|
||||
"@ai-sdk/azure": "^2.0.53",
|
||||
"@ai-sdk/deepseek": "^1.0.23",
|
||||
"@ai-sdk/openai": "patch:@ai-sdk/openai@npm%3A2.0.52#~/.yarn/patches/@ai-sdk-openai-npm-2.0.52-b36d949c76.patch",
|
||||
"@ai-sdk/openai-compatible": "^1.0.22",
|
||||
"@ai-sdk/anthropic": "^2.0.43",
|
||||
"@ai-sdk/azure": "^2.0.66",
|
||||
"@ai-sdk/deepseek": "^1.0.27",
|
||||
"@ai-sdk/openai": "patch:@ai-sdk/openai@npm%3A2.0.64#~/.yarn/patches/@ai-sdk-openai-npm-2.0.64-48f99f5bf3.patch",
|
||||
"@ai-sdk/openai-compatible": "^1.0.26",
|
||||
"@ai-sdk/provider": "^2.0.0",
|
||||
"@ai-sdk/provider-utils": "^3.0.12",
|
||||
"@ai-sdk/xai": "^2.0.26",
|
||||
"@ai-sdk/provider-utils": "^3.0.16",
|
||||
"@ai-sdk/xai": "^2.0.31",
|
||||
"zod": "^4.1.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -275,15 +275,10 @@ export default class MineruPreprocessProvider extends BasePreprocessProvider {
|
||||
try {
|
||||
const fileBuffer = await fs.promises.readFile(filePath)
|
||||
|
||||
// https://mineru.net/apiManage/docs
|
||||
const response = await net.fetch(uploadUrl, {
|
||||
method: 'PUT',
|
||||
body: fileBuffer,
|
||||
headers: {
|
||||
'Content-Type': 'application/pdf'
|
||||
}
|
||||
// headers: {
|
||||
// 'Content-Length': fileBuffer.length.toString()
|
||||
// }
|
||||
body: fileBuffer
|
||||
})
|
||||
|
||||
if (!response.ok) {
|
||||
|
||||
@@ -11,6 +11,7 @@ import * as path from 'path'
|
||||
import type { CreateDirectoryOptions, FileStat } from 'webdav'
|
||||
|
||||
import { getDataPath } from '../utils'
|
||||
import { expandNotesPath } from '../utils/file'
|
||||
import S3Storage from './S3Storage'
|
||||
import WebDav from './WebDav'
|
||||
import { windowService } from './WindowService'
|
||||
@@ -240,11 +241,49 @@ class BackupManager {
|
||||
// 使用流式复制
|
||||
await this.copyDirWithProgress(sourcePath, tempDataDir, (size) => {
|
||||
copiedSize += size
|
||||
const progress = Math.min(50, Math.floor((copiedSize / totalSize) * 50))
|
||||
const progress = Math.min(45, Math.floor((copiedSize / totalSize) * 45))
|
||||
onProgress({ stage: 'copying_files', progress, total: 100 })
|
||||
})
|
||||
|
||||
await this.setWritableRecursive(tempDataDir)
|
||||
|
||||
// 检查并备份 notes 目录(如果配置在 Data 目录外)
|
||||
try {
|
||||
const backupData = JSON.parse(data)
|
||||
const persistData = JSON.parse(backupData.localStorage?.['persist:cherry-studio'] || '{}')
|
||||
const noteState = JSON.parse(persistData.note || '{}')
|
||||
const notesPath = noteState.notesPath
|
||||
|
||||
if (notesPath) {
|
||||
// 展开路径获取绝对路径
|
||||
const expandedNotesPath = expandNotesPath(notesPath)
|
||||
const dataPath = path.join(app.getPath('userData'), 'Data')
|
||||
const normalizedDataPath = path.normalize(dataPath)
|
||||
const normalizedNotesPath = path.normalize(expandedNotesPath)
|
||||
|
||||
// 检查 notes 是否在 Data 目录外
|
||||
const isOutsideData =
|
||||
!normalizedNotesPath.startsWith(normalizedDataPath + path.sep) &&
|
||||
normalizedNotesPath !== normalizedDataPath
|
||||
|
||||
if (isOutsideData && fs.existsSync(expandedNotesPath)) {
|
||||
logger.info(`Backing up notes from external location: ${expandedNotesPath}`)
|
||||
const tempNotesDir = path.join(this.tempDir, 'Notes')
|
||||
await this.copyDirWithProgress(expandedNotesPath, tempNotesDir, (size) => {
|
||||
// Notes backup progress from 45% to 50%
|
||||
copiedSize += size
|
||||
const notesProgress = 45 + Math.min(5, Math.floor((size / totalSize) * 5))
|
||||
onProgress({ stage: 'copying_notes', progress: notesProgress, total: 100 })
|
||||
})
|
||||
await this.setWritableRecursive(tempNotesDir)
|
||||
logger.info('External notes directory backed up successfully')
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
// 如果解析失败或获取 notes 路径失败,继续备份其他内容
|
||||
logger.warn('Failed to parse notes path from backup data, skipping external notes backup', error as Error)
|
||||
}
|
||||
|
||||
onProgress({ stage: 'preparing_compression', progress: 50, total: 100 })
|
||||
} else {
|
||||
logger.debug('Skip the backup of the file')
|
||||
@@ -399,13 +438,52 @@ class BackupManager {
|
||||
// 使用流式复制
|
||||
await this.copyDirWithProgress(sourcePath, destPath, (size) => {
|
||||
copiedSize += size
|
||||
const progress = Math.min(85, 35 + Math.floor((copiedSize / totalSize) * 50))
|
||||
const progress = Math.min(75, 35 + Math.floor((copiedSize / totalSize) * 40))
|
||||
onProgress({ stage: 'copying_files', progress, total: 100 })
|
||||
})
|
||||
} else {
|
||||
logger.debug('skipBackupFile is true, skip restoring Data directory')
|
||||
}
|
||||
|
||||
// 检查并恢复外部 Notes 目录
|
||||
logger.debug('step 3.5: check and restore external Notes directory')
|
||||
const notesBackupPath = path.join(this.tempDir, 'Notes')
|
||||
const notesExists = await fs.pathExists(notesBackupPath)
|
||||
|
||||
if (notesExists) {
|
||||
try {
|
||||
// 从 data.json 中获取 notes 路径配置
|
||||
const backupData = JSON.parse(data)
|
||||
const persistData = JSON.parse(backupData.localStorage?.['persist:cherry-studio'] || '{}')
|
||||
const noteState = JSON.parse(persistData.note || '{}')
|
||||
const notesPath = noteState.notesPath
|
||||
|
||||
if (notesPath) {
|
||||
const expandedNotesPath = expandNotesPath(notesPath)
|
||||
logger.info(`Restoring notes to configured location: ${expandedNotesPath}`)
|
||||
|
||||
// 确保目标目录的父目录存在
|
||||
await fs.ensureDir(path.dirname(expandedNotesPath))
|
||||
|
||||
// 如果目标已存在,先删除
|
||||
if (await fs.pathExists(expandedNotesPath)) {
|
||||
await this.setWritableRecursive(expandedNotesPath)
|
||||
await fs.remove(expandedNotesPath)
|
||||
}
|
||||
|
||||
// 复制 Notes 目录
|
||||
await this.copyDirWithProgress(notesBackupPath, expandedNotesPath, (size) => {
|
||||
const progress = Math.min(85, 75 + Math.floor(size / 1000000))
|
||||
onProgress({ stage: 'copying_notes', progress, total: 100 })
|
||||
})
|
||||
|
||||
logger.info('External notes directory restored successfully')
|
||||
}
|
||||
} catch (error) {
|
||||
logger.warn('Failed to restore external notes directory', error as Error)
|
||||
}
|
||||
}
|
||||
|
||||
logger.debug('step 4: clean up temp directory')
|
||||
// 清理临时目录
|
||||
await this.setWritableRecursive(this.tempDir)
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { loggerService } from '@logger'
|
||||
import {
|
||||
checkName,
|
||||
expandNotesPath,
|
||||
getFilesDir,
|
||||
getFileType,
|
||||
getName,
|
||||
getNotesDir,
|
||||
getNotesDirAbsolute,
|
||||
getTempDir,
|
||||
readTextFileWithAutoEncoding,
|
||||
scanDir
|
||||
@@ -56,7 +57,7 @@ const DEFAULT_WATCHER_CONFIG: Required<FileWatcherConfig> = {
|
||||
|
||||
class FileStorage {
|
||||
private storageDir = getFilesDir()
|
||||
private notesDir = getNotesDir()
|
||||
private notesDir = getNotesDirAbsolute()
|
||||
private tempDir = getTempDir()
|
||||
private watcher?: FSWatcher
|
||||
private watcherSender?: Electron.WebContents
|
||||
@@ -741,7 +742,9 @@ class FileStorage {
|
||||
|
||||
public getDirectoryStructure = async (_: Electron.IpcMainInvokeEvent, dirPath: string): Promise<NotesTreeNode[]> => {
|
||||
try {
|
||||
return await scanDir(dirPath)
|
||||
// Expand relative paths before scanning
|
||||
const expandedPath = expandNotesPath(dirPath)
|
||||
return await scanDir(expandedPath)
|
||||
} catch (error) {
|
||||
logger.error('Failed to get directory structure:', error as Error)
|
||||
throw error
|
||||
@@ -754,8 +757,8 @@ class FileStorage {
|
||||
return false
|
||||
}
|
||||
|
||||
// Normalize path
|
||||
const normalizedPath = path.resolve(dirPath)
|
||||
// Expand and normalize path (handles ~, ., and .. paths)
|
||||
const normalizedPath = expandNotesPath(dirPath)
|
||||
|
||||
// Check if directory exists
|
||||
if (!fs.existsSync(normalizedPath)) {
|
||||
@@ -771,7 +774,7 @@ class FileStorage {
|
||||
// Get app paths to prevent selection of restricted directories
|
||||
const appDataPath = path.resolve(process.env.APPDATA || path.join(require('os').homedir(), '.config'))
|
||||
const filesDir = path.resolve(getFilesDir())
|
||||
const currentNotesDir = path.resolve(getNotesDir())
|
||||
const currentNotesDir = getNotesDirAbsolute()
|
||||
|
||||
// Prevent selecting app data directories
|
||||
if (
|
||||
@@ -1008,7 +1011,8 @@ class FileStorage {
|
||||
throw new Error('Directory path is required')
|
||||
}
|
||||
|
||||
const normalizedPath = path.resolve(dirPath.trim())
|
||||
// Expand relative paths before watching
|
||||
const normalizedPath = expandNotesPath(dirPath.trim())
|
||||
|
||||
if (!fs.existsSync(normalizedPath)) {
|
||||
throw new Error(`Directory does not exist: ${normalizedPath}`)
|
||||
|
||||
@@ -10,11 +10,14 @@ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
|
||||
|
||||
import { readTextFileWithAutoEncoding } from '../file'
|
||||
import {
|
||||
expandNotesPath,
|
||||
getAllFiles,
|
||||
getAppConfigDir,
|
||||
getConfigDir,
|
||||
getFilesDir,
|
||||
getFileType,
|
||||
getNotesDir,
|
||||
getNotesDirAbsolute,
|
||||
getTempDir,
|
||||
isPathInside,
|
||||
untildify
|
||||
@@ -244,6 +247,20 @@ describe('file', () => {
|
||||
})
|
||||
})
|
||||
|
||||
describe('getNotesDir', () => {
|
||||
it('should return relative path for portability', () => {
|
||||
const notesDir = getNotesDir()
|
||||
expect(notesDir).toBe('./Data/Notes')
|
||||
})
|
||||
})
|
||||
|
||||
describe('getNotesDirAbsolute', () => {
|
||||
it('should return absolute notes directory path', () => {
|
||||
const notesDirAbsolute = getNotesDirAbsolute()
|
||||
expect(notesDirAbsolute).toBe('/mock/userData/Data/Notes')
|
||||
})
|
||||
})
|
||||
|
||||
describe('getAppConfigDir', () => {
|
||||
it('should return correct app config directory path', () => {
|
||||
const appConfigDir = getAppConfigDir('test-app')
|
||||
@@ -331,6 +348,64 @@ describe('file', () => {
|
||||
})
|
||||
})
|
||||
|
||||
describe('expandNotesPath', () => {
|
||||
beforeEach(() => {
|
||||
// Mock path.isAbsolute
|
||||
vi.mocked(path.isAbsolute).mockImplementation((p) => {
|
||||
return p.startsWith('/') || /^[A-Za-z]:/.test(p)
|
||||
})
|
||||
|
||||
// Mock path.resolve
|
||||
vi.mocked(path.resolve).mockImplementation((...args) => {
|
||||
const joined = args.join('/')
|
||||
return joined.startsWith('/') ? joined : `/${joined}`
|
||||
})
|
||||
|
||||
// Mock path.normalize
|
||||
vi.mocked(path.normalize).mockImplementation((p) => p.replace(/\/+/g, '/'))
|
||||
})
|
||||
|
||||
it('should expand tilde paths to home directory', () => {
|
||||
const result = expandNotesPath('~/Notes')
|
||||
expect(result).toBe('/mock/home/Notes')
|
||||
})
|
||||
|
||||
it('should expand relative paths using userData as base', () => {
|
||||
const result = expandNotesPath('./Notes')
|
||||
expect(result).toContain('userData')
|
||||
})
|
||||
|
||||
it('should return absolute paths unchanged', () => {
|
||||
const result = expandNotesPath('/absolute/path/Notes')
|
||||
expect(result).toBe('/absolute/path/Notes')
|
||||
})
|
||||
|
||||
it('should handle Windows absolute paths', () => {
|
||||
const result = expandNotesPath('C:\\Users\\Notes')
|
||||
expect(result).toBe('C:\\Users\\Notes')
|
||||
})
|
||||
|
||||
it('should handle empty string', () => {
|
||||
const result = expandNotesPath('')
|
||||
expect(result).toBe('')
|
||||
})
|
||||
|
||||
it('should expand parent directory paths', () => {
|
||||
const result = expandNotesPath('../Notes')
|
||||
expect(result).toContain('userData')
|
||||
})
|
||||
|
||||
it('should use custom base path when provided', () => {
|
||||
const result = expandNotesPath('./Notes', '/custom/base')
|
||||
expect(result).toContain('/custom/base')
|
||||
})
|
||||
|
||||
it('should handle complex relative paths', () => {
|
||||
const result = expandNotesPath('../../Notes')
|
||||
expect(result).toContain('userData')
|
||||
})
|
||||
})
|
||||
|
||||
describe('isPathInside', () => {
|
||||
beforeEach(() => {
|
||||
// Mock path.resolve to simulate path resolution
|
||||
|
||||
@@ -38,6 +38,33 @@ export function untildify(pathWithTilde: string) {
|
||||
return pathWithTilde
|
||||
}
|
||||
|
||||
/**
|
||||
* Expand relative paths to absolute paths.
|
||||
* Handles paths starting with ~, ., or ..
|
||||
* @param pathString - The path to expand
|
||||
* @param basePath - Optional base path for relative paths (defaults to userData directory)
|
||||
* @returns Absolute path
|
||||
*/
|
||||
export function expandNotesPath(pathString: string, basePath?: string): string {
|
||||
if (!pathString) {
|
||||
return pathString
|
||||
}
|
||||
|
||||
// First handle tilde expansion
|
||||
let expandedPath = untildify(pathString)
|
||||
|
||||
// If it's already an absolute path, return it
|
||||
if (path.isAbsolute(expandedPath)) {
|
||||
return path.normalize(expandedPath)
|
||||
}
|
||||
|
||||
// For relative paths, resolve against the base path (default to userData)
|
||||
const base = basePath || app.getPath('userData')
|
||||
expandedPath = path.resolve(base, expandedPath)
|
||||
|
||||
return path.normalize(expandedPath)
|
||||
}
|
||||
|
||||
export async function hasWritePermission(dir: string) {
|
||||
try {
|
||||
logger.info(`Checking write permission for ${dir}`)
|
||||
@@ -156,7 +183,12 @@ export function getNotesDir() {
|
||||
fs.mkdirSync(notesDir, { recursive: true })
|
||||
logger.info(`Notes directory created at: ${notesDir}`)
|
||||
}
|
||||
return notesDir
|
||||
// Return relative path for better portability across devices
|
||||
return './Data/Notes'
|
||||
}
|
||||
|
||||
export function getNotesDirAbsolute() {
|
||||
return path.join(app.getPath('userData'), 'Data', 'Notes')
|
||||
}
|
||||
|
||||
export function getConfigDir() {
|
||||
|
||||
@@ -2102,8 +2102,8 @@
|
||||
"select": "Select",
|
||||
"select_directory_failed": "Failed to select directory",
|
||||
"title": "Data Settings",
|
||||
"work_directory_description": "Work directory is where all note files are stored. Changing the work directory won't move existing files, please migrate files manually.",
|
||||
"work_directory_placeholder": "Select notes work directory"
|
||||
"work_directory_description": "Work directory is where all note files are stored. Supports relative paths like ~/Notes or ./Notes for multi-device sync. Changing the work directory won't move existing files, please migrate files manually.",
|
||||
"work_directory_placeholder": "Enter or select notes work directory (e.g., ~/Notes)"
|
||||
},
|
||||
"display": {
|
||||
"compress_content": "Content Compression",
|
||||
|
||||
@@ -2102,8 +2102,8 @@
|
||||
"select": "选择",
|
||||
"select_directory_failed": "选择目录失败",
|
||||
"title": "数据设置",
|
||||
"work_directory_description": "工作目录是存储所有笔记文件的位置。更改工作目录不会移动现有文件,请手动迁移文件。",
|
||||
"work_directory_placeholder": "选择笔记工作目录"
|
||||
"work_directory_description": "工作目录是存储所有笔记文件的位置。支持相对路径如 ~/笔记 或 ./笔记 以实现多设备同步。更改工作目录不会移动现有文件,请手动迁移文件。",
|
||||
"work_directory_placeholder": "输入或选择笔记工作目录(例如:~/笔记)"
|
||||
},
|
||||
"display": {
|
||||
"compress_content": "缩减栏宽",
|
||||
|
||||
@@ -2102,8 +2102,8 @@
|
||||
"select": "選擇",
|
||||
"select_directory_failed": "選擇目錄失敗",
|
||||
"title": "數據設置",
|
||||
"work_directory_description": "工作目錄是存儲所有筆記文件的位置。\n更改工作目錄不會移動現有文件,請手動遷移文件。",
|
||||
"work_directory_placeholder": "選擇筆記工作目錄"
|
||||
"work_directory_description": "工作目錄是存儲所有筆記文件的位置。支持相對路徑如 ~/筆記 或 ./筆記 以實現多設備同步。\n更改工作目錄不會移動現有文件,請手動遷移文件。",
|
||||
"work_directory_placeholder": "輸入或選擇筆記工作目錄(例如:~/筆記)"
|
||||
},
|
||||
"display": {
|
||||
"compress_content": "縮減欄寬",
|
||||
|
||||
@@ -472,9 +472,15 @@ const NewApiPage: FC<{ Options: string[] }> = ({ Options }) => {
|
||||
addPainting(mode, newPainting)
|
||||
setPainting(newPainting)
|
||||
} else {
|
||||
setPainting(filteredPaintings[0])
|
||||
// 如果当前 painting 存在于 filteredPaintings 中,则优先显示当前 painting
|
||||
const found = filteredPaintings.find((p) => p.id === painting.id)
|
||||
if (found) {
|
||||
setPainting(found)
|
||||
} else {
|
||||
setPainting(filteredPaintings[0])
|
||||
}
|
||||
}
|
||||
}, [filteredPaintings, mode, addPainting, getNewPainting])
|
||||
}, [filteredPaintings, mode, addPainting, getNewPainting, painting.id])
|
||||
|
||||
useEffect(() => {
|
||||
const timer = spaceClickTimer.current
|
||||
|
||||
@@ -105,7 +105,6 @@ const NotesSettings: FC = () => {
|
||||
value={tempPath}
|
||||
onChange={(e) => setTempPath(e.target.value)}
|
||||
placeholder={t('notes.settings.data.work_directory_placeholder')}
|
||||
readOnly
|
||||
/>
|
||||
<Button
|
||||
type="default"
|
||||
|
||||
@@ -2765,7 +2765,7 @@ const migrateConfig = {
|
||||
provider.anthropicApiHost = 'https://aihubmix.com'
|
||||
break
|
||||
case 'new-api':
|
||||
provider.anthropicApiHost = 'http://localhost:3000'
|
||||
provider.anthropicApiHost = provider.apiHost
|
||||
break
|
||||
case 'grok':
|
||||
provider.anthropicApiHost = 'https://api.x.ai'
|
||||
|
||||
253
yarn.lock
253
yarn.lock
@@ -74,159 +74,159 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@ai-sdk/amazon-bedrock@npm:^3.0.42":
|
||||
version: 3.0.42
|
||||
resolution: "@ai-sdk/amazon-bedrock@npm:3.0.42"
|
||||
"@ai-sdk/amazon-bedrock@npm:^3.0.53":
|
||||
version: 3.0.53
|
||||
resolution: "@ai-sdk/amazon-bedrock@npm:3.0.53"
|
||||
dependencies:
|
||||
"@ai-sdk/anthropic": "npm:2.0.32"
|
||||
"@ai-sdk/anthropic": "npm:2.0.43"
|
||||
"@ai-sdk/provider": "npm:2.0.0"
|
||||
"@ai-sdk/provider-utils": "npm:3.0.12"
|
||||
"@ai-sdk/provider-utils": "npm:3.0.16"
|
||||
"@smithy/eventstream-codec": "npm:^4.0.1"
|
||||
"@smithy/util-utf8": "npm:^4.0.0"
|
||||
aws4fetch: "npm:^1.0.20"
|
||||
peerDependencies:
|
||||
zod: ^3.25.76 || ^4.1.8
|
||||
checksum: 10c0/659de3d62f1907489bb14cd7fe049274c0a5f754222eda41b500d66573422ddaad3380cf8fc6eaae8a39ab25445e81aca7664ca2068b4a93c49bcb605889b2ba
|
||||
checksum: 10c0/4ad693af6796fac6cb6f5aacf512708478a045070435f10781072aeb02f4f97083b86ae4fff135329703af7ceb158349c6b62e6f05b394817dca5d90ff31d528
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@ai-sdk/anthropic@npm:2.0.32, @ai-sdk/anthropic@npm:^2.0.32":
|
||||
version: 2.0.32
|
||||
resolution: "@ai-sdk/anthropic@npm:2.0.32"
|
||||
"@ai-sdk/anthropic@npm:2.0.43, @ai-sdk/anthropic@npm:^2.0.43":
|
||||
version: 2.0.43
|
||||
resolution: "@ai-sdk/anthropic@npm:2.0.43"
|
||||
dependencies:
|
||||
"@ai-sdk/provider": "npm:2.0.0"
|
||||
"@ai-sdk/provider-utils": "npm:3.0.12"
|
||||
"@ai-sdk/provider-utils": "npm:3.0.16"
|
||||
peerDependencies:
|
||||
zod: ^3.25.76 || ^4.1.8
|
||||
checksum: 10c0/f83ec81fe150dacd9207b67a173f7e150b44a0b2b57e6361c061e35b663bbb95240ea18066bd2bce73df722b85772ca174c4f1546b29eb6e6d1fcf4f349e756b
|
||||
checksum: 10c0/a83029edc541a9cecda9e15b8732de111ed739a586b55d6a0e7d2b8ef40660289986d7a144252736bfc9ee067ee19b11d5c5830278513aa32c6fa24666bd0e78
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@ai-sdk/azure@npm:^2.0.53":
|
||||
version: 2.0.53
|
||||
resolution: "@ai-sdk/azure@npm:2.0.53"
|
||||
"@ai-sdk/azure@npm:^2.0.66":
|
||||
version: 2.0.66
|
||||
resolution: "@ai-sdk/azure@npm:2.0.66"
|
||||
dependencies:
|
||||
"@ai-sdk/openai": "npm:2.0.52"
|
||||
"@ai-sdk/openai": "npm:2.0.64"
|
||||
"@ai-sdk/provider": "npm:2.0.0"
|
||||
"@ai-sdk/provider-utils": "npm:3.0.12"
|
||||
"@ai-sdk/provider-utils": "npm:3.0.16"
|
||||
peerDependencies:
|
||||
zod: ^3.25.76 || ^4.1.8
|
||||
checksum: 10c0/39346f50434c3568b40bb57aa64010261ae767d9aa49b4477999ca78431326275b111879b9c5431ce35ca4ca376c47455618c8bf528c54402b0dad1b03e10487
|
||||
checksum: 10c0/261c00a3998611857f0e7c95962849d8e4468262477b07dafd29b0d447ae4088a8b3fc351ca84086e4cf008e2ee9d6efeb379964a091539d6af16a25a8726cd4
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@ai-sdk/deepseek@npm:^1.0.23":
|
||||
version: 1.0.23
|
||||
resolution: "@ai-sdk/deepseek@npm:1.0.23"
|
||||
"@ai-sdk/deepseek@npm:^1.0.27":
|
||||
version: 1.0.27
|
||||
resolution: "@ai-sdk/deepseek@npm:1.0.27"
|
||||
dependencies:
|
||||
"@ai-sdk/openai-compatible": "npm:1.0.22"
|
||||
"@ai-sdk/openai-compatible": "npm:1.0.26"
|
||||
"@ai-sdk/provider": "npm:2.0.0"
|
||||
"@ai-sdk/provider-utils": "npm:3.0.12"
|
||||
"@ai-sdk/provider-utils": "npm:3.0.16"
|
||||
peerDependencies:
|
||||
zod: ^3.25.76 || ^4.1.8
|
||||
checksum: 10c0/39736e9787420ce86d0f2ce6935ba51f2b721acfb4c0d2b77064a8b939cf22b0767a83b82a5c99efff1311080532a3aaa2f34804d7981133f671a050521ed197
|
||||
checksum: 10c0/8d05887ef5e9c08d63a54f0b51c1ff6c9242daab339aaae919d2dc48a11d1065a84b0dc3e5f1e9b48ef20122ff330a5eee826f0632402d1ff87fcec9a2edd516
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@ai-sdk/gateway@npm:2.0.0":
|
||||
version: 2.0.0
|
||||
resolution: "@ai-sdk/gateway@npm:2.0.0"
|
||||
"@ai-sdk/gateway@npm:2.0.7":
|
||||
version: 2.0.7
|
||||
resolution: "@ai-sdk/gateway@npm:2.0.7"
|
||||
dependencies:
|
||||
"@ai-sdk/provider": "npm:2.0.0"
|
||||
"@ai-sdk/provider-utils": "npm:3.0.12"
|
||||
"@ai-sdk/provider-utils": "npm:3.0.16"
|
||||
"@vercel/oidc": "npm:3.0.3"
|
||||
peerDependencies:
|
||||
zod: ^3.25.76 || ^4.1.8
|
||||
checksum: 10c0/720cfb827bc64f3eb6bb86d17e7e7947c54bdc7d74db7f6e9e162be0973a45368c05829e4b257704182ca9c4886e7f3c74f6b64841e88359930f48f288aa958a
|
||||
checksum: 10c0/b57db87ccfbda6d28c8ac6e24df5e57a45f18826bff3ca5d1b65b00d863dd779d2b0d80496eee8eea8cbf6db232c31bd00494cd0d25e745cb402aa98b0b4d50d
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@ai-sdk/google-vertex@npm:^3.0.48":
|
||||
version: 3.0.48
|
||||
resolution: "@ai-sdk/google-vertex@npm:3.0.48"
|
||||
"@ai-sdk/google-vertex@npm:^3.0.61":
|
||||
version: 3.0.61
|
||||
resolution: "@ai-sdk/google-vertex@npm:3.0.61"
|
||||
dependencies:
|
||||
"@ai-sdk/anthropic": "npm:2.0.32"
|
||||
"@ai-sdk/google": "npm:2.0.23"
|
||||
"@ai-sdk/anthropic": "npm:2.0.43"
|
||||
"@ai-sdk/google": "npm:2.0.30"
|
||||
"@ai-sdk/provider": "npm:2.0.0"
|
||||
"@ai-sdk/provider-utils": "npm:3.0.12"
|
||||
"@ai-sdk/provider-utils": "npm:3.0.16"
|
||||
google-auth-library: "npm:^9.15.0"
|
||||
peerDependencies:
|
||||
zod: ^3.25.76 || ^4.1.8
|
||||
checksum: 10c0/79f0ccb78c4930ea57a41e81f31a1935531d8f02b738d0aae13fa865272f4dac6b1c31b2e1c8b8ca65671a96b90cd4f14fabaa9d60ab0252c6c0e6a1828e7f09
|
||||
checksum: 10c0/e4c074f7bb6227b84d17e1f8fda03e90da34b1bdca441a744cd4226836f44f7b97df7e908e482d974fe6e768ae13d7b038d9324dbb5e53423f1e9489ea2f7785
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@ai-sdk/google@npm:2.0.23":
|
||||
version: 2.0.23
|
||||
resolution: "@ai-sdk/google@npm:2.0.23"
|
||||
"@ai-sdk/google@npm:2.0.30":
|
||||
version: 2.0.30
|
||||
resolution: "@ai-sdk/google@npm:2.0.30"
|
||||
dependencies:
|
||||
"@ai-sdk/provider": "npm:2.0.0"
|
||||
"@ai-sdk/provider-utils": "npm:3.0.12"
|
||||
"@ai-sdk/provider-utils": "npm:3.0.16"
|
||||
peerDependencies:
|
||||
zod: ^3.25.76 || ^4.1.8
|
||||
checksum: 10c0/402b78f392196c3e23c75cc35fc1d701f9521b57aace2fb1bbae6a0d57bbb3894a778b0485305bd6674998403e44c3883dca2416f2d48377722351debead9f11
|
||||
checksum: 10c0/6f4fc6b92cc03437fcb46f5e32c32195c0fcc9b523c3818d57c4f1526c65af61173f13c2222f725361656377452b9063d5257edf08326f7fb6ad709f7796ab4e
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@ai-sdk/google@patch:@ai-sdk/google@npm%3A2.0.23#~/.yarn/patches/@ai-sdk-google-npm-2.0.23-81682e07b0.patch":
|
||||
version: 2.0.23
|
||||
resolution: "@ai-sdk/google@patch:@ai-sdk/google@npm%3A2.0.23#~/.yarn/patches/@ai-sdk-google-npm-2.0.23-81682e07b0.patch::version=2.0.23&hash=df67ed"
|
||||
"@ai-sdk/google@patch:@ai-sdk/google@npm%3A2.0.30#~/.yarn/patches/@ai-sdk-google-npm-2.0.30-3b31632362.patch":
|
||||
version: 2.0.30
|
||||
resolution: "@ai-sdk/google@patch:@ai-sdk/google@npm%3A2.0.30#~/.yarn/patches/@ai-sdk-google-npm-2.0.30-3b31632362.patch::version=2.0.30&hash=be6198"
|
||||
dependencies:
|
||||
"@ai-sdk/provider": "npm:2.0.0"
|
||||
"@ai-sdk/provider-utils": "npm:3.0.12"
|
||||
"@ai-sdk/provider-utils": "npm:3.0.16"
|
||||
peerDependencies:
|
||||
zod: ^3.25.76 || ^4.1.8
|
||||
checksum: 10c0/e7fda169f04190b3ef37937e61219dcf8dade735cf76a9af8f1a1def83a43846659a361835814f0b68a2c392bc840a457a693cb69fed42af375771dd210ebdbe
|
||||
checksum: 10c0/60c4eda30a4f8460594f1f825c3a1a9ea564035f99c4da954d641b406394d8cfa411f3fcdd370a4e60006a84e360e084bc7f925f4517c87ffcdd149165d8989e
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@ai-sdk/huggingface@npm:0.0.4":
|
||||
version: 0.0.4
|
||||
resolution: "@ai-sdk/huggingface@npm:0.0.4"
|
||||
"@ai-sdk/huggingface@npm:0.0.8":
|
||||
version: 0.0.8
|
||||
resolution: "@ai-sdk/huggingface@npm:0.0.8"
|
||||
dependencies:
|
||||
"@ai-sdk/openai-compatible": "npm:1.0.22"
|
||||
"@ai-sdk/openai-compatible": "npm:1.0.26"
|
||||
"@ai-sdk/provider": "npm:2.0.0"
|
||||
"@ai-sdk/provider-utils": "npm:3.0.12"
|
||||
"@ai-sdk/provider-utils": "npm:3.0.16"
|
||||
peerDependencies:
|
||||
zod: ^3.25.76 || ^4
|
||||
checksum: 10c0/756b8f820b89bf9550c9281dfe2a1a813477dec82be5557e236e8b5eaaf0204b65a65925ad486b7576c687f33c709f6d99fd4fc87a46b1add210435b08834986
|
||||
checksum: 10c0/12d5064bb3dbb591941c76a33ffa76e75df0c1fb547255c20acbdc9cfd00a434c8210d92df382717c188022aa705ad36c3e31ddcb6b1387f154f956c9ea61e66
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@ai-sdk/huggingface@patch:@ai-sdk/huggingface@npm%3A0.0.4#~/.yarn/patches/@ai-sdk-huggingface-npm-0.0.4-8080836bc1.patch":
|
||||
version: 0.0.4
|
||||
resolution: "@ai-sdk/huggingface@patch:@ai-sdk/huggingface@npm%3A0.0.4#~/.yarn/patches/@ai-sdk-huggingface-npm-0.0.4-8080836bc1.patch::version=0.0.4&hash=ceb48e"
|
||||
"@ai-sdk/huggingface@patch:@ai-sdk/huggingface@npm%3A0.0.8#~/.yarn/patches/@ai-sdk-huggingface-npm-0.0.8-d4d0aaac93.patch":
|
||||
version: 0.0.8
|
||||
resolution: "@ai-sdk/huggingface@patch:@ai-sdk/huggingface@npm%3A0.0.8#~/.yarn/patches/@ai-sdk-huggingface-npm-0.0.8-d4d0aaac93.patch::version=0.0.8&hash=ceb48e"
|
||||
dependencies:
|
||||
"@ai-sdk/openai-compatible": "npm:1.0.22"
|
||||
"@ai-sdk/openai-compatible": "npm:1.0.26"
|
||||
"@ai-sdk/provider": "npm:2.0.0"
|
||||
"@ai-sdk/provider-utils": "npm:3.0.12"
|
||||
"@ai-sdk/provider-utils": "npm:3.0.16"
|
||||
peerDependencies:
|
||||
zod: ^3.25.76 || ^4
|
||||
checksum: 10c0/4726a10de7a6fd554b58d62f79cd6514c2cc5166052e035ba1517e224a310ddb355a5d2922ee8507fb8d928d6d5b2b102d3d221af5a44b181e436e6b64382087
|
||||
checksum: 10c0/30760547543f7e33fe088a4a5b5be7ce0cd37f446a5ddb13c99c5a2725c6c020fc76d6cf6bc1c5cdd8f765366ecb3022605096dc45cd50acf602ef46a89c1eb7
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@ai-sdk/mistral@npm:^2.0.19":
|
||||
version: 2.0.19
|
||||
resolution: "@ai-sdk/mistral@npm:2.0.19"
|
||||
"@ai-sdk/mistral@npm:^2.0.23":
|
||||
version: 2.0.23
|
||||
resolution: "@ai-sdk/mistral@npm:2.0.23"
|
||||
dependencies:
|
||||
"@ai-sdk/provider": "npm:2.0.0"
|
||||
"@ai-sdk/provider-utils": "npm:3.0.12"
|
||||
"@ai-sdk/provider-utils": "npm:3.0.16"
|
||||
peerDependencies:
|
||||
zod: ^3.25.76 || ^4.1.8
|
||||
checksum: 10c0/522d1e4631e9318f82f5993030c8fa2a28341e749bc920d32966d91d5cd5a4d1638980b7e0a62601aaaaf7a25e04fefed18b07ce50034c5c5d903ac5bebb65ec
|
||||
checksum: 10c0/7b7597740d1e48ee4905f48276c46591fbdd6d7042f001ec1a34256c8b054f480f547c6aa9175987e6fdfc4c068925176d0123fa3b4b5af985d55b7890cfe80a
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@ai-sdk/openai-compatible@npm:1.0.22, @ai-sdk/openai-compatible@npm:^1.0.22":
|
||||
version: 1.0.22
|
||||
resolution: "@ai-sdk/openai-compatible@npm:1.0.22"
|
||||
"@ai-sdk/openai-compatible@npm:1.0.26, @ai-sdk/openai-compatible@npm:^1.0.26":
|
||||
version: 1.0.26
|
||||
resolution: "@ai-sdk/openai-compatible@npm:1.0.26"
|
||||
dependencies:
|
||||
"@ai-sdk/provider": "npm:2.0.0"
|
||||
"@ai-sdk/provider-utils": "npm:3.0.12"
|
||||
"@ai-sdk/provider-utils": "npm:3.0.16"
|
||||
peerDependencies:
|
||||
zod: ^3.25.76 || ^4.1.8
|
||||
checksum: 10c0/31eb07b63eaf07384391e81d824e16589af540f3af2fde1cb24f2a6d04dd07ddb843c9301dbceca78fa5ae5002cb235fc376c41532ab167d1564491526e6011b
|
||||
checksum: 10c0/b419641f1e97c2db688f2371cdc4efb4c16652fde74fff92afaa614eea5aabee40d7f2e4e082f00d3805f12390084c7b47986de570e836beb1466c2dd48d31e9
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -242,51 +242,39 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@ai-sdk/openai@npm:2.0.52":
|
||||
version: 2.0.52
|
||||
resolution: "@ai-sdk/openai@npm:2.0.52"
|
||||
"@ai-sdk/openai@npm:2.0.64":
|
||||
version: 2.0.64
|
||||
resolution: "@ai-sdk/openai@npm:2.0.64"
|
||||
dependencies:
|
||||
"@ai-sdk/provider": "npm:2.0.0"
|
||||
"@ai-sdk/provider-utils": "npm:3.0.12"
|
||||
"@ai-sdk/provider-utils": "npm:3.0.16"
|
||||
peerDependencies:
|
||||
zod: ^3.25.76 || ^4.1.8
|
||||
checksum: 10c0/253125303235dc677e272eaffbcd5c788373e12f897e42da7cce827bcc952f31e4bb11b72ba06931f37d49a2588f6cba8526127d539025bbd58d78d7bcfc691d
|
||||
checksum: 10c0/fde91951ca5f2612458d618fd2b8a6e29a8cae61f1bda45816258c697af5ec6f047dbd3acc1fcc921db6e39dfa3158799f0e66f737bcd40f5f0cdd10be74d2a7
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@ai-sdk/openai@npm:^2.0.42":
|
||||
version: 2.0.53
|
||||
resolution: "@ai-sdk/openai@npm:2.0.53"
|
||||
"@ai-sdk/openai@patch:@ai-sdk/openai@npm%3A2.0.64#~/.yarn/patches/@ai-sdk-openai-npm-2.0.64-48f99f5bf3.patch":
|
||||
version: 2.0.64
|
||||
resolution: "@ai-sdk/openai@patch:@ai-sdk/openai@npm%3A2.0.64#~/.yarn/patches/@ai-sdk-openai-npm-2.0.64-48f99f5bf3.patch::version=2.0.64&hash=e78090"
|
||||
dependencies:
|
||||
"@ai-sdk/provider": "npm:2.0.0"
|
||||
"@ai-sdk/provider-utils": "npm:3.0.12"
|
||||
"@ai-sdk/provider-utils": "npm:3.0.16"
|
||||
peerDependencies:
|
||||
zod: ^3.25.76 || ^4.1.8
|
||||
checksum: 10c0/acb014c7e4d99be0502fe2190c3b91c76ee86ade25e80dad939ffd113a5f013f29a81f06e13fa0e6a76b49fcb8cc524aab180fc1a622ceb8d3dac58fd655de1c
|
||||
checksum: 10c0/e4a0967cbdb25309144c6263e6d691fa67898953207e050c23ba99df23ce76ab025fed3a79d541d54b99b4a049a945db2a4a3fbae5ab3a52207f024f5b4e6f4a
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@ai-sdk/openai@patch:@ai-sdk/openai@npm%3A2.0.52#~/.yarn/patches/@ai-sdk-openai-npm-2.0.52-b36d949c76.patch":
|
||||
version: 2.0.52
|
||||
resolution: "@ai-sdk/openai@patch:@ai-sdk/openai@npm%3A2.0.52#~/.yarn/patches/@ai-sdk-openai-npm-2.0.52-b36d949c76.patch::version=2.0.52&hash=c7ceb9"
|
||||
"@ai-sdk/perplexity@npm:^2.0.17":
|
||||
version: 2.0.17
|
||||
resolution: "@ai-sdk/perplexity@npm:2.0.17"
|
||||
dependencies:
|
||||
"@ai-sdk/provider": "npm:2.0.0"
|
||||
"@ai-sdk/provider-utils": "npm:3.0.12"
|
||||
"@ai-sdk/provider-utils": "npm:3.0.16"
|
||||
peerDependencies:
|
||||
zod: ^3.25.76 || ^4.1.8
|
||||
checksum: 10c0/a3ac267a645ffd50952c312318d0ea6190e1ca961f910f9e3067211df731ac4ba0eb89face21b5cc195770b643326b295a6fece91f07b60db8aef32f45d4664e
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@ai-sdk/perplexity@npm:^2.0.13":
|
||||
version: 2.0.13
|
||||
resolution: "@ai-sdk/perplexity@npm:2.0.13"
|
||||
dependencies:
|
||||
"@ai-sdk/provider": "npm:2.0.0"
|
||||
"@ai-sdk/provider-utils": "npm:3.0.12"
|
||||
peerDependencies:
|
||||
zod: ^3.25.76 || ^4.1.8
|
||||
checksum: 10c0/80434eebec088d5f373901f1beb77ca4ba564df5f04dec43c69a7996ea0d88344a3d86ca5e5ef2dc4f5c45f45fc478dabf3a0e44a3faea86a0190c087491a661
|
||||
checksum: 10c0/7c900a507bc7a60efb120ee4d251cb98314a6ea0f2d876552caf7b8c18e44ff38a8e205e94e6fa823629ac30c4e191c2441b107556c2b50bc4e90f80e6094bb1
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -303,16 +291,16 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@ai-sdk/provider-utils@npm:3.0.12, @ai-sdk/provider-utils@npm:^3.0.12":
|
||||
version: 3.0.12
|
||||
resolution: "@ai-sdk/provider-utils@npm:3.0.12"
|
||||
"@ai-sdk/provider-utils@npm:3.0.16, @ai-sdk/provider-utils@npm:^3.0.16":
|
||||
version: 3.0.16
|
||||
resolution: "@ai-sdk/provider-utils@npm:3.0.16"
|
||||
dependencies:
|
||||
"@ai-sdk/provider": "npm:2.0.0"
|
||||
"@standard-schema/spec": "npm:^1.0.0"
|
||||
eventsource-parser: "npm:^3.0.5"
|
||||
eventsource-parser: "npm:^3.0.6"
|
||||
peerDependencies:
|
||||
zod: ^3.25.76 || ^4.1.8
|
||||
checksum: 10c0/83886bf188cad0cc655b680b710a10413989eaba9ec59dd24a58b985c02a8a1d50ad0f96dd5259385c07592ec3c37a7769fdf4a1ef569a73c9edbdb2cd585915
|
||||
checksum: 10c0/0922af1864b31aed4704174683d356c482199bf691c3d1a3e27cdedd574eec2249ea386b1081023d301a87e38dea09ec259ee45c5889316f7eed0de0a6064a49
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -334,16 +322,16 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@ai-sdk/xai@npm:^2.0.26":
|
||||
version: 2.0.26
|
||||
resolution: "@ai-sdk/xai@npm:2.0.26"
|
||||
"@ai-sdk/xai@npm:^2.0.31":
|
||||
version: 2.0.31
|
||||
resolution: "@ai-sdk/xai@npm:2.0.31"
|
||||
dependencies:
|
||||
"@ai-sdk/openai-compatible": "npm:1.0.22"
|
||||
"@ai-sdk/openai-compatible": "npm:1.0.26"
|
||||
"@ai-sdk/provider": "npm:2.0.0"
|
||||
"@ai-sdk/provider-utils": "npm:3.0.12"
|
||||
"@ai-sdk/provider-utils": "npm:3.0.16"
|
||||
peerDependencies:
|
||||
zod: ^3.25.76 || ^4.1.8
|
||||
checksum: 10c0/72fef55a96d9c3820de02beb9b63e53902649c5db906a892b7818a984b6e8afe161daa225b8d527b74f783e2c4eecd474af6e96efbb95761aca2c508e0c7c2d9
|
||||
checksum: 10c0/33a0336f032a12b8406cc1aa1541fdf1a7b9924555456b77844e47a5ddf11b726fdbcec1a240cb66a9c7597a1a05503cf03204866730c39f99e7d4442b781ec0
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -1819,14 +1807,14 @@ __metadata:
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@cherrystudio/ai-core@workspace:packages/aiCore"
|
||||
dependencies:
|
||||
"@ai-sdk/anthropic": "npm:^2.0.32"
|
||||
"@ai-sdk/azure": "npm:^2.0.53"
|
||||
"@ai-sdk/deepseek": "npm:^1.0.23"
|
||||
"@ai-sdk/openai": "patch:@ai-sdk/openai@npm%3A2.0.52#~/.yarn/patches/@ai-sdk-openai-npm-2.0.52-b36d949c76.patch"
|
||||
"@ai-sdk/openai-compatible": "npm:^1.0.22"
|
||||
"@ai-sdk/anthropic": "npm:^2.0.43"
|
||||
"@ai-sdk/azure": "npm:^2.0.66"
|
||||
"@ai-sdk/deepseek": "npm:^1.0.27"
|
||||
"@ai-sdk/openai": "patch:@ai-sdk/openai@npm%3A2.0.64#~/.yarn/patches/@ai-sdk-openai-npm-2.0.64-48f99f5bf3.patch"
|
||||
"@ai-sdk/openai-compatible": "npm:^1.0.26"
|
||||
"@ai-sdk/provider": "npm:^2.0.0"
|
||||
"@ai-sdk/provider-utils": "npm:^3.0.12"
|
||||
"@ai-sdk/xai": "npm:^2.0.26"
|
||||
"@ai-sdk/provider-utils": "npm:^3.0.16"
|
||||
"@ai-sdk/xai": "npm:^2.0.31"
|
||||
tsdown: "npm:^0.12.9"
|
||||
typescript: "npm:^5.0.0"
|
||||
vitest: "npm:^3.2.4"
|
||||
@@ -9846,11 +9834,11 @@ __metadata:
|
||||
"@agentic/exa": "npm:^7.3.3"
|
||||
"@agentic/searxng": "npm:^7.3.3"
|
||||
"@agentic/tavily": "npm:^7.3.3"
|
||||
"@ai-sdk/amazon-bedrock": "npm:^3.0.42"
|
||||
"@ai-sdk/google-vertex": "npm:^3.0.48"
|
||||
"@ai-sdk/huggingface": "patch:@ai-sdk/huggingface@npm%3A0.0.4#~/.yarn/patches/@ai-sdk-huggingface-npm-0.0.4-8080836bc1.patch"
|
||||
"@ai-sdk/mistral": "npm:^2.0.19"
|
||||
"@ai-sdk/perplexity": "npm:^2.0.13"
|
||||
"@ai-sdk/amazon-bedrock": "npm:^3.0.53"
|
||||
"@ai-sdk/google-vertex": "npm:^3.0.61"
|
||||
"@ai-sdk/huggingface": "patch:@ai-sdk/huggingface@npm%3A0.0.8#~/.yarn/patches/@ai-sdk-huggingface-npm-0.0.8-d4d0aaac93.patch"
|
||||
"@ai-sdk/mistral": "npm:^2.0.23"
|
||||
"@ai-sdk/perplexity": "npm:^2.0.17"
|
||||
"@ant-design/v5-patch-for-react-19": "npm:^1.0.3"
|
||||
"@anthropic-ai/claude-agent-sdk": "patch:@anthropic-ai/claude-agent-sdk@npm%3A0.1.25#~/.yarn/patches/@anthropic-ai-claude-agent-sdk-npm-0.1.25-08bbabb5d3.patch"
|
||||
"@anthropic-ai/sdk": "npm:^0.41.0"
|
||||
@@ -9977,7 +9965,7 @@ __metadata:
|
||||
"@viz-js/lang-dot": "npm:^1.0.5"
|
||||
"@viz-js/viz": "npm:^3.14.0"
|
||||
"@xyflow/react": "npm:^12.4.4"
|
||||
ai: "npm:^5.0.76"
|
||||
ai: "npm:^5.0.90"
|
||||
antd: "patch:antd@npm%3A5.27.0#~/.yarn/patches/antd-npm-5.27.0-aa91c36546.patch"
|
||||
archiver: "npm:^7.0.1"
|
||||
async-mutex: "npm:^0.5.0"
|
||||
@@ -9987,7 +9975,7 @@ __metadata:
|
||||
check-disk-space: "npm:3.4.0"
|
||||
cheerio: "npm:^1.1.2"
|
||||
chokidar: "npm:^4.0.3"
|
||||
claude-code-plugins: "npm:1.0.1"
|
||||
claude-code-plugins: "npm:1.0.3"
|
||||
cli-progress: "npm:^3.12.0"
|
||||
clsx: "npm:^2.1.1"
|
||||
code-inspector-plugin: "npm:^0.20.14"
|
||||
@@ -10250,17 +10238,17 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"ai@npm:^5.0.76":
|
||||
version: 5.0.76
|
||||
resolution: "ai@npm:5.0.76"
|
||||
"ai@npm:^5.0.90":
|
||||
version: 5.0.90
|
||||
resolution: "ai@npm:5.0.90"
|
||||
dependencies:
|
||||
"@ai-sdk/gateway": "npm:2.0.0"
|
||||
"@ai-sdk/gateway": "npm:2.0.7"
|
||||
"@ai-sdk/provider": "npm:2.0.0"
|
||||
"@ai-sdk/provider-utils": "npm:3.0.12"
|
||||
"@ai-sdk/provider-utils": "npm:3.0.16"
|
||||
"@opentelemetry/api": "npm:1.9.0"
|
||||
peerDependencies:
|
||||
zod: ^3.25.76 || ^4.1.8
|
||||
checksum: 10c0/167a191354b72106b1af6cfc8b53975637ca43919b8f48db81c0cf542ef0172f55958ed9331adcd08d017a608a98cb0b4a253c62732038322c78091e32595771
|
||||
checksum: 10c0/feee8908803743cee49216a37bcbc6f33e2183423d623863e8a0c5ce065dcb18d17c5c86b8f587bf391818bb47a882287f14650a77a857accb5cb7a0ecb2653c
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -11628,10 +11616,10 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"claude-code-plugins@npm:1.0.1":
|
||||
version: 1.0.1
|
||||
resolution: "claude-code-plugins@npm:1.0.1"
|
||||
checksum: 10c0/13fb614d1b65ea001f774183b8e9ce3deaab5402f2d99fc92f0786de5931db33b30cf975f723186bbfcf694f675c9a9ba182e531e92d25a4350844279e0bd6d5
|
||||
"claude-code-plugins@npm:1.0.3":
|
||||
version: 1.0.3
|
||||
resolution: "claude-code-plugins@npm:1.0.3"
|
||||
checksum: 10c0/e91f47df5c5e5cfb368568f5786fdd180caf1e4f5a9006670e7820ad9abcf57d5e6e692bedc8dc16b6c799630351f1b6485b46e1e68f7d7ff1a50b28da25ce50
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -14506,6 +14494,13 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"eventsource-parser@npm:^3.0.6":
|
||||
version: 3.0.6
|
||||
resolution: "eventsource-parser@npm:3.0.6"
|
||||
checksum: 10c0/70b8ccec7dac767ef2eca43f355e0979e70415701691382a042a2df8d6a68da6c2fca35363669821f3da876d29c02abe9b232964637c1b6635c940df05ada78a
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"eventsource@npm:^3.0.2":
|
||||
version: 3.0.6
|
||||
resolution: "eventsource@npm:3.0.6"
|
||||
|
||||
Reference in New Issue
Block a user