mirror of
https://github.com/hellodigua/ChatLab.git
synced 2026-10-26 02:04:37 +08:00
refactor: remove 3 pure re-export wrappers in electron/main/ai
Delete tokenizer/index.ts, skills/parser.ts, and assistant/parser.ts which were single-line re-exports from @openchatlab/node-runtime. All consumers now import directly from the shared package.
This commit is contained in:
1 parent
596eaa3051
commit
932b2553b0
8 files changed
+5
-22
No files matched your search
@@ -18,5 +18,5 @@ export {
|
||||
importAssistantFromMd,
|
||||
isGeneralAssistant,
|
||||
} from './manager'
|
||||
export { parseAssistantFile, serializeAssistant } from './parser'
|
||||
export { parseAssistantFile, serializeAssistant } from '@openchatlab/node-runtime'
|
||||
export { getBuiltinToolCatalog, type BuiltinToolCatalogEntry } from './builtinTools'
|
||||
@@ -17,7 +17,7 @@ import * as path from 'path'
|
||||
import { randomUUID } from 'crypto'
|
||||
import { getAiDataDir, ensureDir } from '../../paths'
|
||||
import { aiLogger } from '../logger'
|
||||
import { parseAssistantFile, serializeAssistant } from './parser'
|
||||
import { parseAssistantFile, serializeAssistant } from '@openchatlab/node-runtime'
|
||||
import type {
|
||||
AssistantConfig,
|
||||
AssistantSummary,
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
/**
|
||||
* 助手文件解析器 — 从 @openchatlab/node-runtime 重导出
|
||||
*/
|
||||
|
||||
export { parseAssistantFile, serializeAssistant } from '@openchatlab/node-runtime'
|
||||
@@ -18,4 +18,4 @@ export {
|
||||
importSkillFromMd,
|
||||
} from './manager'
|
||||
|
||||
export { parseSkillFile } from './parser'
|
||||
export { parseSkillFile } from '@openchatlab/node-runtime'
|
||||
@@ -15,7 +15,7 @@ import * as path from 'path'
|
||||
import { createHash } from 'crypto'
|
||||
import { getAiDataDir, ensureDir } from '../../paths'
|
||||
import { aiLogger } from '../logger'
|
||||
import { parseSkillFile } from './parser'
|
||||
import { parseSkillFile } from '@openchatlab/node-runtime'
|
||||
import type { SkillDef, SkillSummary, SkillInitResult, SkillSaveResult, BuiltinSkillInfo } from './types'
|
||||
|
||||
// ==================== 内置技能模板 ====================
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
/**
|
||||
* 技能文件解析器 — 从 @openchatlab/node-runtime 重导出
|
||||
*/
|
||||
|
||||
export { parseSkillFile, extractSkillId } from '@openchatlab/node-runtime'
|
||||
@@ -1,7 +0,0 @@
|
||||
/**
|
||||
* Token 计数模块 — 薄包装
|
||||
*
|
||||
* 实际实现已提取到 @openchatlab/node-runtime。
|
||||
*/
|
||||
|
||||
export { countTokens, countMessagesTokens } from '@openchatlab/node-runtime'
|
||||
@@ -11,7 +11,7 @@ import { Agent, type AgentStreamChunk, type SkillContext } from '../ai/agent'
|
||||
import { getDefaultGeneralAssistantId } from '../ai/assistant/defaultGeneral'
|
||||
import { getDefaultAssistantConfig, buildPiModel, findModelDefinition } from '../ai/llm'
|
||||
import type { AIServiceConfig } from '../ai/llm/types'
|
||||
import { countMessagesTokens } from '../ai/tokenizer'
|
||||
import { countMessagesTokens } from '@openchatlab/node-runtime'
|
||||
import * as assistantManager from '../ai/assistant'
|
||||
import type { AssistantConfig } from '../ai/assistant/types'
|
||||
import * as skillManager from '../ai/skills'
|
||||
|
||||
Reference in new issue
Block a user