更新大量 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,143 +1,104 @@
import { c as _c } from "react/compiler-runtime";
import figures from 'figures';
import React from 'react';
import { Box, Text } from '../../../ink.js';
import type { Question } from '../../../tools/AskUserQuestionTool/AskUserQuestionTool.js';
import type { PermissionDecision } from '../../../utils/permissions/PermissionResult.js';
import { Select } from '../../CustomSelect/index.js';
import { Divider } from '../../design-system/Divider.js';
import { PermissionRequestTitle } from '../PermissionRequestTitle.js';
import { PermissionRuleExplanation } from '../PermissionRuleExplanation.js';
import { QuestionNavigationBar } from './QuestionNavigationBar.js';
import figures from 'figures'
import React from 'react'
import { Box, Text } from '../../../ink.js'
import type { Question } from '../../../tools/AskUserQuestionTool/AskUserQuestionTool.js'
import type { PermissionDecision } from '../../../utils/permissions/PermissionResult.js'
import { Select } from '../../CustomSelect/index.js'
import { Divider } from '../../design-system/Divider.js'
import { PermissionRequestTitle } from '../PermissionRequestTitle.js'
import { PermissionRuleExplanation } from '../PermissionRuleExplanation.js'
import { QuestionNavigationBar } from './QuestionNavigationBar.js'
type Props = {
questions: Question[];
currentQuestionIndex: number;
answers: Record<string, string>;
allQuestionsAnswered: boolean;
permissionResult: PermissionDecision;
minContentHeight?: number;
onFinalResponse: (value: 'submit' | 'cancel') => void;
};
export function SubmitQuestionsView(t0) {
const $ = _c(27);
const {
questions,
currentQuestionIndex,
answers,
allQuestionsAnswered,
permissionResult,
minContentHeight,
onFinalResponse
} = t0;
let t1;
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
t1 = <Divider color="inactive" />;
$[0] = t1;
} else {
t1 = $[0];
}
let t2;
if ($[1] !== answers || $[2] !== currentQuestionIndex || $[3] !== questions) {
t2 = <QuestionNavigationBar questions={questions} currentQuestionIndex={currentQuestionIndex} answers={answers} />;
$[1] = answers;
$[2] = currentQuestionIndex;
$[3] = questions;
$[4] = t2;
} else {
t2 = $[4];
}
let t3;
if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
t3 = <PermissionRequestTitle title="Review your answers" color="text" />;
$[5] = t3;
} else {
t3 = $[5];
}
let t4;
if ($[6] !== allQuestionsAnswered) {
t4 = !allQuestionsAnswered && <Box marginBottom={1}><Text color="warning">{figures.warning} You have not answered all questions</Text></Box>;
$[6] = allQuestionsAnswered;
$[7] = t4;
} else {
t4 = $[7];
}
let t5;
if ($[8] !== answers || $[9] !== questions) {
t5 = Object.keys(answers).length > 0 && <Box flexDirection="column" marginBottom={1}>{questions.filter(q => q?.question && answers[q.question]).map(q_0 => {
const answer = answers[q_0?.question];
return <Box key={q_0?.question || "answer"} flexDirection="column" marginLeft={1}><Text>{figures.bullet} {q_0?.question || "Question"}</Text><Box marginLeft={2}><Text color="success">{figures.arrowRight} {answer}</Text></Box></Box>;
})}</Box>;
$[8] = answers;
$[9] = questions;
$[10] = t5;
} else {
t5 = $[10];
}
let t6;
if ($[11] !== permissionResult) {
t6 = <PermissionRuleExplanation permissionResult={permissionResult} toolType="tool" />;
$[11] = permissionResult;
$[12] = t6;
} else {
t6 = $[12];
}
let t7;
if ($[13] === Symbol.for("react.memo_cache_sentinel")) {
t7 = <Text color="inactive">Ready to submit your answers?</Text>;
$[13] = t7;
} else {
t7 = $[13];
}
let t8;
if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
t8 = {
type: "text" as const,
label: "Submit answers",
value: "submit"
};
$[14] = t8;
} else {
t8 = $[14];
}
let t9;
if ($[15] === Symbol.for("react.memo_cache_sentinel")) {
t9 = [t8, {
type: "text" as const,
label: "Cancel",
value: "cancel"
}];
$[15] = t9;
} else {
t9 = $[15];
}
let t10;
if ($[16] !== onFinalResponse) {
t10 = <Box marginTop={1}><Select options={t9} onChange={value => onFinalResponse(value as 'submit' | 'cancel')} onCancel={() => onFinalResponse("cancel")} /></Box>;
$[16] = onFinalResponse;
$[17] = t10;
} else {
t10 = $[17];
}
let t11;
if ($[18] !== minContentHeight || $[19] !== t10 || $[20] !== t4 || $[21] !== t5 || $[22] !== t6) {
t11 = <Box flexDirection="column" marginTop={1} minHeight={minContentHeight}>{t4}{t5}{t6}{t7}{t10}</Box>;
$[18] = minContentHeight;
$[19] = t10;
$[20] = t4;
$[21] = t5;
$[22] = t6;
$[23] = t11;
} else {
t11 = $[23];
}
let t12;
if ($[24] !== t11 || $[25] !== t2) {
t12 = <Box flexDirection="column" marginTop={1}>{t1}<Box flexDirection="column" borderTop={true} borderColor="inactive" paddingTop={0}>{t2}{t3}{t11}</Box></Box>;
$[24] = t11;
$[25] = t2;
$[26] = t12;
} else {
t12 = $[26];
}
return t12;
questions: Question[]
currentQuestionIndex: number
answers: Record<string, string>
allQuestionsAnswered: boolean
permissionResult: PermissionDecision
minContentHeight?: number
onFinalResponse: (value: 'submit' | 'cancel') => void
}
export function SubmitQuestionsView({
questions,
currentQuestionIndex,
answers,
allQuestionsAnswered,
permissionResult,
minContentHeight,
onFinalResponse,
}: Props): React.ReactNode {
return (
<Box flexDirection="column" marginTop={1}>
<Divider color="inactive" />
<Box
flexDirection="column"
borderTop
borderColor="inactive"
paddingTop={0}
>
<QuestionNavigationBar
questions={questions}
currentQuestionIndex={currentQuestionIndex}
answers={answers}
/>
<PermissionRequestTitle title="Review your answers" color="text" />
<Box flexDirection="column" marginTop={1} minHeight={minContentHeight}>
{!allQuestionsAnswered && (
<Box marginBottom={1}>
<Text color="warning">
{figures.warning} You have not answered all questions
</Text>
</Box>
)}
{Object.keys(answers).length > 0 && (
<Box flexDirection="column" marginBottom={1}>
{questions
.filter((q: Question) => q?.question && answers[q.question])
.map((q: Question) => {
const answer = answers[q?.question]
return (
<Box
key={q?.question || 'answer'}
flexDirection="column"
marginLeft={1}
>
<Text>
{figures.bullet} {q?.question || 'Question'}
</Text>
<Box marginLeft={2}>
<Text color="success">
{figures.arrowRight} {answer}
</Text>
</Box>
</Box>
)
})}
</Box>
)}
<PermissionRuleExplanation
permissionResult={permissionResult}
toolType="tool"
/>
<Text color="inactive">Ready to submit your answers?</Text>
<Box marginTop={1}>
<Select
options={[
{
type: 'text' as const,
label: 'Submit answers',
value: 'submit',
},
{ type: 'text' as const, label: 'Cancel', value: 'cancel' },
]}
onChange={value => onFinalResponse(value as 'submit' | 'cancel')}
onCancel={() => onFinalResponse('cancel')}
/>
</Box>
</Box>
</Box>
</Box>
)
}