refactor(agent): replace OMP with Claude Code kernel

This commit is contained in:
xiaohan.yuan committed 2026-10-20 14:47:56 +08:00
1 parent 0fb2226f8c
commit 9a1f182397
232 files changed
+2561 -25564

No files matched your search

+2 -2
View File
@@ -56,7 +56,7 @@ const STUB = `<script>
window: { minimize(){}, toggleMaximize(){}, close(){}, getState: async()=>({maximized:false,fullscreen:false}), onState:()=>()=>{}, onFocus:()=>()=>{} },
edit: { action: async()=>{} },
app: {
info: async()=>({name:'YCode',version:'0.1.0',electron:'37',chromium:'',node:'',configDir:'',omp:{available:false,exePath:null,profile:'',model:null}}),
info: async()=>({name:'YCode',version:'0.1.0',electron:'37',chromium:'',node:'',configDir:'',claude:{available:false,exePath:null,sessionDir:''}}),
openConfigDir: async()=>{},
// 原版由主进程另开设置窗口(settings.html?window=settings);离线替身在同一标签内切换。
openSettings: async(section,action)=>{ try { const url=new URL('settings.html?window=settings',location.href); if(section) url.searchParams.set('section',String(section)); if(action) url.searchParams.set('action',String(action)); location.assign(url.href) } catch {} },
@@ -93,7 +93,7 @@ const STUB = `<script>
},
chat: {
send: async(payload)=>({runId:'offline-run',assistantMessageId:'offline-assistant',modelId:'',modelName:'离线假桥',userMessage:{id:'offline-user-message',role:'user',content:payload&&payload.text,createdAt:Date.now(),status:'done'}}),
cancel: async()=>{}, cancelAgent: async()=>{}, onEvent:()=>()=>{}, onStarted:()=>()=>{},
cancel: async()=>{}, setSessionVisible: async()=>({accepted:true}), onEvent:()=>()=>{}, onStarted:()=>()=>{},
activeRun: async()=>null, inspectEdit: async()=>({editable:false,reason:'离线假桥不支持就地编辑'}),
revert: async()=>({messages:[]}), respond: async()=>({accepted:false}), feedback: async()=>{}
},