Compare commits

..

2 Commits

Author SHA1 Message Date
claude-code-best
7e61e71c54 fix: 尝试禁用 UDS_INBOX 修复 nodejs 进入失败问题 2026-04-28 14:32:23 +08:00
claude-code-best
b8b48bf7ed fix: 修复 truncate 函数接收到 undefined/null 时崩溃的问题
BackgroundTask 组件渲染时传入的 task 属性(description、title、command 等)
可能为 undefined,导致 str.indexOf('\n') 抛出 TypeError。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-28 09:15:58 +08:00
3 changed files with 5 additions and 4 deletions

View File

@@ -1,6 +1,6 @@
{ {
"name": "claude-code-best", "name": "claude-code-best",
"version": "1.10.8", "version": "1.10.9",
"description": "Reverse-engineered Anthropic Claude Code CLI — interactive AI coding assistant in the terminal", "description": "Reverse-engineered Anthropic Claude Code CLI — interactive AI coding assistant in the terminal",
"type": "module", "type": "module",
"author": "claude-code-best <claude-code-best@proton.me>", "author": "claude-code-best <claude-code-best@proton.me>",

View File

@@ -53,10 +53,10 @@ export const DEFAULT_BUILD_FEATURES = [
'CONTEXT_COLLAPSE', // 上下文折叠,自动压缩旧消息 'CONTEXT_COLLAPSE', // 上下文折叠,自动压缩旧消息
'MONITOR_TOOL', // Monitor 工具,流式监控后台进程输出 'MONITOR_TOOL', // Monitor 工具,流式监控后台进程输出
'FORK_SUBAGENT', // Fork 子代理,在隔离上下文中并行执行任务 'FORK_SUBAGENT', // Fork 子代理,在隔离上下文中并行执行任务
'UDS_INBOX', // inbox 数组只增不减(非 GB 级主因) // 'UDS_INBOX', // inbox 数组只增不减(非 GB 级主因)
'KAIROS', // Kairos 定时任务系统核心 'KAIROS', // Kairos 定时任务系统核心
// 'COORDINATOR_MODE', // 已禁用AgentSummary 30s fork 循环GB 级泄露主因 // 'COORDINATOR_MODE', // 已禁用AgentSummary 30s fork 循环GB 级泄露主因
'LAN_PIPES', // 依赖 UDS_INBOX已随 UDS_INBOX 恢复) // 'LAN_PIPES', // 依赖 UDS_INBOX已随 UDS_INBOX 恢复)
'BG_SESSIONS', // 后台会话管理ps/logs/attach/kill 'BG_SESSIONS', // 后台会话管理ps/logs/attach/kill
'TEMPLATES', // 模板任务new/list/reply 子命令) 'TEMPLATES', // 模板任务new/list/reply 子命令)
// 'REVIEW_ARTIFACT', // 代码审查产物API 请求无响应,待排查 schema 兼容性) // 'REVIEW_ARTIFACT', // 代码审查产物API 请求无响应,待排查 schema 兼容性)

View File

@@ -132,10 +132,11 @@ export function truncateToWidthNoEllipsis(
* @returns The truncated string with ellipsis if needed * @returns The truncated string with ellipsis if needed
*/ */
export function truncate( export function truncate(
str: string, str: string | undefined | null,
maxWidth: number, maxWidth: number,
singleLine: boolean = false, singleLine: boolean = false,
): string { ): string {
if (str == null) return ''
let result = str let result = str
// If singleLine is true, truncate at first newline // If singleLine is true, truncate at first newline