更新大量 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,157 +1,85 @@
import { c as _c } from "react/compiler-runtime";
import figures from 'figures';
import React from 'react';
import { Box, Text } from '../../ink.js';
import type { AdvisorBlock } from '../../utils/advisor.js';
import { renderModelName } from '../../utils/model/model.js';
import { jsonStringify } from '../../utils/slowOperations.js';
import { CtrlOToExpand } from '../CtrlOToExpand.js';
import { MessageResponse } from '../MessageResponse.js';
import { ToolUseLoader } from '../ToolUseLoader.js';
import figures from 'figures'
import React from 'react'
import { Box, Text } from '../../ink.js'
import type { AdvisorBlock } from '../../utils/advisor.js'
import { renderModelName } from '../../utils/model/model.js'
import { jsonStringify } from '../../utils/slowOperations.js'
import { CtrlOToExpand } from '../CtrlOToExpand.js'
import { MessageResponse } from '../MessageResponse.js'
import { ToolUseLoader } from '../ToolUseLoader.js'
type Props = {
block: AdvisorBlock;
addMargin: boolean;
resolvedToolUseIDs: Set<string>;
erroredToolUseIDs: Set<string>;
shouldAnimate: boolean;
verbose: boolean;
advisorModel?: string;
};
export function AdvisorMessage(t0) {
const $ = _c(30);
const {
block,
addMargin,
resolvedToolUseIDs,
erroredToolUseIDs,
shouldAnimate,
verbose,
advisorModel
} = t0;
if (block.type === "server_tool_use") {
let t1;
if ($[0] !== block.input) {
t1 = block.input && Object.keys(block.input).length > 0 ? jsonStringify(block.input) : null;
$[0] = block.input;
$[1] = t1;
} else {
t1 = $[1];
}
const input = t1;
const t2 = addMargin ? 1 : 0;
let t3;
if ($[2] !== block.id || $[3] !== resolvedToolUseIDs) {
t3 = resolvedToolUseIDs.has(block.id);
$[2] = block.id;
$[3] = resolvedToolUseIDs;
$[4] = t3;
} else {
t3 = $[4];
}
const t4 = !t3;
let t5;
if ($[5] !== block.id || $[6] !== erroredToolUseIDs) {
t5 = erroredToolUseIDs.has(block.id);
$[5] = block.id;
$[6] = erroredToolUseIDs;
$[7] = t5;
} else {
t5 = $[7];
}
let t6;
if ($[8] !== shouldAnimate || $[9] !== t4 || $[10] !== t5) {
t6 = <ToolUseLoader shouldAnimate={shouldAnimate} isUnresolved={t4} isError={t5} />;
$[8] = shouldAnimate;
$[9] = t4;
$[10] = t5;
$[11] = t6;
} else {
t6 = $[11];
}
let t7;
if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
t7 = <Text bold={true}>Advising</Text>;
$[12] = t7;
} else {
t7 = $[12];
}
let t8;
if ($[13] !== advisorModel) {
t8 = advisorModel ? <Text dimColor={true}> using {renderModelName(advisorModel)}</Text> : null;
$[13] = advisorModel;
$[14] = t8;
} else {
t8 = $[14];
}
let t9;
if ($[15] !== input) {
t9 = input ? <Text dimColor={true}> · {input}</Text> : null;
$[15] = input;
$[16] = t9;
} else {
t9 = $[16];
}
let t10;
if ($[17] !== t2 || $[18] !== t6 || $[19] !== t8 || $[20] !== t9) {
t10 = <Box marginTop={t2} paddingRight={2} flexDirection="row">{t6}{t7}{t8}{t9}</Box>;
$[17] = t2;
$[18] = t6;
$[19] = t8;
$[20] = t9;
$[21] = t10;
} else {
t10 = $[21];
}
return t10;
}
let body;
bb0: switch (block.content.type) {
case "advisor_tool_result_error":
{
let t1;
if ($[22] !== block.content.error_code) {
t1 = <Text color="error">Advisor unavailable ({block.content.error_code})</Text>;
$[22] = block.content.error_code;
$[23] = t1;
} else {
t1 = $[23];
}
body = t1;
break bb0;
}
case "advisor_result":
{
let t1;
if ($[24] !== block.content.text || $[25] !== verbose) {
t1 = verbose ? <Text dimColor={true}>{block.content.text}</Text> : <Text dimColor={true}>{figures.tick} Advisor has reviewed the conversation and will apply the feedback <CtrlOToExpand /></Text>;
$[24] = block.content.text;
$[25] = verbose;
$[26] = t1;
} else {
t1 = $[26];
}
body = t1;
break bb0;
}
case "advisor_redacted_result":
{
let t1;
if ($[27] === Symbol.for("react.memo_cache_sentinel")) {
t1 = <Text dimColor={true}>{figures.tick} Advisor has reviewed the conversation and will apply the feedback</Text>;
$[27] = t1;
} else {
t1 = $[27];
}
body = t1;
}
}
let t1;
if ($[28] !== body) {
t1 = <Box paddingRight={2}><MessageResponse>{body}</MessageResponse></Box>;
$[28] = body;
$[29] = t1;
} else {
t1 = $[29];
}
return t1;
block: AdvisorBlock
addMargin: boolean
resolvedToolUseIDs: Set<string>
erroredToolUseIDs: Set<string>
shouldAnimate: boolean
verbose: boolean
advisorModel?: string
}
export function AdvisorMessage({
block,
addMargin,
resolvedToolUseIDs,
erroredToolUseIDs,
shouldAnimate,
verbose,
advisorModel,
}: Props): React.ReactNode {
if (block.type === 'server_tool_use') {
const input =
block.input && Object.keys(block.input).length > 0
? jsonStringify(block.input)
: null
return (
<Box marginTop={addMargin ? 1 : 0} paddingRight={2} flexDirection="row">
<ToolUseLoader
shouldAnimate={shouldAnimate}
isUnresolved={!resolvedToolUseIDs.has(block.id)}
isError={erroredToolUseIDs.has(block.id)}
/>
<Text bold>Advising</Text>
{advisorModel ? (
<Text dimColor> using {renderModelName(advisorModel)}</Text>
) : null}
{input ? <Text dimColor> · {input}</Text> : null}
</Box>
)
}
let body: React.ReactNode
switch (block.content.type) {
case 'advisor_tool_result_error':
body = (
<Text color="error">
Advisor unavailable ({block.content.error_code})
</Text>
)
break
case 'advisor_result':
body = verbose ? (
<Text dimColor>{block.content.text}</Text>
) : (
<Text dimColor>
{figures.tick} Advisor has reviewed the conversation and will apply
the feedback <CtrlOToExpand />
</Text>
)
break
case 'advisor_redacted_result':
body = (
<Text dimColor>
{figures.tick} Advisor has reviewed the conversation and will apply
the feedback
</Text>
)
break
}
return (
<Box paddingRight={2}>
<MessageResponse>{body}</MessageResponse>
</Box>
)
}