更新大量 tsx 原始文件; 已经迁移 login panel; 部分 (#121)

* style(B1-1): 格式化 ink/buddy/cli/context/screens/tasks/services/keybindings/state (43 files)

纯格式化:移除分号、React Compiler import、import 多行展开。
修复了 Box.tsx 和 ScrollBox.tsx 中无效的 global.d.ts import。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* style(B1-2): 格式化 commands (79 files)

纯格式化:移除分号、React Compiler import、import 多行展开。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* style(B1-3): 格式化 components/messages,permissions,mcp,sandbox,shell (104 files)

纯格式化:移除分号、React Compiler import、import 多行展开。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* style(B1-4): 格式化 components/PromptInput,FeedbackSurvey,tasks,agents,skills,design-system,wizard (73 files)

纯格式化:移除分号、React Compiler import、import 多行展开。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* style(B1-5): 格式化 components其余 + hooks + tools (232 files)

纯格式化:移除分号、React Compiler import、import 多行展开。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* style(B1-6): 格式化 main/entrypoints/utils/moreright (21 files)

纯格式化:移除分号、React Compiler import、import 多行展开。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* docs: 更新 README,新增 Run.ps1/TODO.md,删除 V6.md

- README.md: 大幅重写,更详细版本历史和配置示例
- Run.ps1: 新增 Windows 启动脚本
- TODO.md: 新增包完成清单
- V6.md: 删除(架构重构规划已不适用)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: 修复以前的问题

* fix: 修复 login 面板的问题

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
claude-code-best
2026-04-04 23:24:27 +08:00
committed by GitHub
parent 02694918b5
commit 5b1a52b8e0
559 changed files with 103807 additions and 101817 deletions

View File

@@ -1,94 +1,91 @@
import { c as _c } from "react/compiler-runtime";
import { relative } from 'path';
import React from 'react';
import { Box, Text } from '../ink.js';
import { DiagnosticTrackingService } from '../services/diagnosticTracking.js';
import type { Attachment } from '../utils/attachments.js';
import { getCwd } from '../utils/cwd.js';
import { CtrlOToExpand } from './CtrlOToExpand.js';
import { MessageResponse } from './MessageResponse.js';
type DiagnosticsAttachment = Extract<Attachment, {
type: 'diagnostics';
}>;
import { relative } from 'path'
import React from 'react'
import { Box, Text } from '../ink.js'
import { DiagnosticTrackingService } from '../services/diagnosticTracking.js'
import type { Attachment } from '../utils/attachments.js'
import { getCwd } from '../utils/cwd.js'
import { CtrlOToExpand } from './CtrlOToExpand.js'
import { MessageResponse } from './MessageResponse.js'
type DiagnosticsAttachment = Extract<Attachment, { type: 'diagnostics' }>
type DiagnosticsDisplayProps = {
attachment: DiagnosticsAttachment;
verbose: boolean;
};
export function DiagnosticsDisplay(t0) {
const $ = _c(14);
const {
attachment,
verbose
} = t0;
if (attachment.files.length === 0) {
return null;
}
let t1;
if ($[0] !== attachment.files) {
t1 = attachment.files.reduce(_temp, 0);
$[0] = attachment.files;
$[1] = t1;
} else {
t1 = $[1];
}
const totalIssues = t1;
const fileCount = attachment.files.length;
attachment: DiagnosticsAttachment
verbose: boolean
}
export function DiagnosticsDisplay({
attachment,
verbose,
}: DiagnosticsDisplayProps): React.ReactNode {
// Only show if there are diagnostics to report
if (attachment.files.length === 0) return null
// Count total issues
const totalIssues = attachment.files.reduce(
(sum, file) => sum + file.diagnostics.length,
0,
)
const fileCount = attachment.files.length
if (verbose) {
let t2;
if ($[2] !== attachment.files) {
t2 = attachment.files.map(_temp3);
$[2] = attachment.files;
$[3] = t2;
} else {
t2 = $[3];
}
let t3;
if ($[4] !== t2) {
t3 = <Box flexDirection="column">{t2}</Box>;
$[4] = t2;
$[5] = t3;
} else {
t3 = $[5];
}
return t3;
// Show all diagnostics in verbose mode (ctrl+o)
return (
<Box flexDirection="column">
{attachment.files.map((file, fileIndex) => (
<React.Fragment key={fileIndex}>
<MessageResponse>
<Text dimColor wrap="wrap">
<Text bold>
{relative(
getCwd(),
file.uri
.replace('file://', '')
.replace('_claude_fs_right:', ''),
)}
</Text>{' '}
<Text dimColor>
{file.uri.startsWith('file://')
? '(file://)'
: file.uri.startsWith('_claude_fs_right:')
? '(claude_fs_right)'
: `(${file.uri.split(':')[0]})`}
</Text>
:
</Text>
</MessageResponse>
{file.diagnostics.map((diagnostic, diagIndex) => (
<MessageResponse key={diagIndex}>
<Text dimColor wrap="wrap">
{' '}
{DiagnosticTrackingService.getSeveritySymbol(
diagnostic.severity,
)}
{' [Line '}
{diagnostic.range.start.line + 1}:
{diagnostic.range.start.character + 1}
{'] '}
{diagnostic.message}
{diagnostic.code ? ` [${diagnostic.code}]` : ''}
{diagnostic.source ? ` (${diagnostic.source})` : ''}
</Text>
</MessageResponse>
))}
</React.Fragment>
))}
</Box>
)
} else {
let t2;
if ($[6] !== totalIssues) {
t2 = <Text bold={true}>{totalIssues}</Text>;
$[6] = totalIssues;
$[7] = t2;
} else {
t2 = $[7];
}
const t3 = totalIssues === 1 ? "issue" : "issues";
const t4 = fileCount === 1 ? "file" : "files";
let t5;
if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
t5 = <CtrlOToExpand />;
$[8] = t5;
} else {
t5 = $[8];
}
let t6;
if ($[9] !== fileCount || $[10] !== t2 || $[11] !== t3 || $[12] !== t4) {
t6 = <MessageResponse><Text dimColor={true} wrap="wrap">Found {t2} new diagnostic{" "}{t3} in {fileCount}{" "}{t4} {t5}</Text></MessageResponse>;
$[9] = fileCount;
$[10] = t2;
$[11] = t3;
$[12] = t4;
$[13] = t6;
} else {
t6 = $[13];
}
return t6;
// Show summary in normal mode
return (
<MessageResponse>
<Text dimColor wrap="wrap">
Found <Text bold>{totalIssues}</Text> new diagnostic{' '}
{totalIssues === 1 ? 'issue' : 'issues'} in {fileCount}{' '}
{fileCount === 1 ? 'file' : 'files'} <CtrlOToExpand />
</Text>
</MessageResponse>
)
}
}
function _temp3(file_0, fileIndex) {
return <React.Fragment key={fileIndex}><MessageResponse><Text dimColor={true} wrap="wrap"><Text bold={true}>{relative(getCwd(), file_0.uri.replace("file://", "").replace("_claude_fs_right:", ""))}</Text>{" "}<Text dimColor={true}>{file_0.uri.startsWith("file://") ? "(file://)" : file_0.uri.startsWith("_claude_fs_right:") ? "(claude_fs_right)" : `(${file_0.uri.split(":")[0]})`}</Text>:</Text></MessageResponse>{file_0.diagnostics.map(_temp2)}</React.Fragment>;
}
function _temp2(diagnostic, diagIndex) {
return <MessageResponse key={diagIndex}><Text dimColor={true} wrap="wrap">{" "}{DiagnosticTrackingService.getSeveritySymbol(diagnostic.severity)}{" [Line "}{diagnostic.range.start.line + 1}:{diagnostic.range.start.character + 1}{"] "}{diagnostic.message}{diagnostic.code ? ` [${diagnostic.code}]` : ""}{diagnostic.source ? ` (${diagnostic.source})` : ""}</Text></MessageResponse>;
}
function _temp(sum, file) {
return sum + file.diagnostics.length;
}