Restore existing project works independently of model sessions
This commit is contained in:
1 parent
4eb3efa3d1
commit
0f26b6d072
19 files changed
+1977
-68
No files matched your search
@@ -1,7 +1,19 @@
|
||||
export type CodingRecoveryAction = 'login' | 'continue' | 'check-work' | 'refresh' | 'settings' | 'account';
|
||||
export type CodingRecoveryAction = 'login' | 'continue' | 'check-work' | 'assist-work' | 'refresh' | 'settings' | 'account';
|
||||
|
||||
/** Product copy is intentionally independent of raw provider/tool diagnostics. */
|
||||
export function codingRecovery(errorCode?: string, work = false) {
|
||||
if (work && errorCode === 'WORK_PREVIEW_NEEDS_HELP') {
|
||||
return { action: 'assist-work' as const, label: '让助手检查', message: '还没找到这个作品的打开方式,可以让助手检查已有文件和启动情况。' };
|
||||
}
|
||||
if (work && errorCode === 'WORK_PREVIEW_DEPENDENCIES_MISSING') {
|
||||
return { action: 'assist-work' as const, label: '让助手检查', message: '这个作品缺少运行组件,可以让助手检查并帮你准备。' };
|
||||
}
|
||||
if (work && errorCode === 'WORK_PREVIEW_ENTRY_MISSING') {
|
||||
return { action: 'assist-work' as const, label: '让助手检查', message: '之前的作品入口找不到了,可能移动或修改过文件,可以让助手重新检查。' };
|
||||
}
|
||||
if (work && errorCode === 'WORK_PREVIEW_START_FAILED') {
|
||||
return { action: 'check-work' as const, label: '重新打开作品', message: '作品没能启动。可以重新打开,或让助手检查原因。' };
|
||||
}
|
||||
if (errorCode === 'CODING_PROVIDER_AUTH_REQUIRED' || errorCode === 'AUTH_INVALID') {
|
||||
return { action: 'login' as const, label: '登录并继续', message: '登录已失效,重新登录后就能接着完成这一步。' };
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user