mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-17 22:05:50 +00:00
fix: 修复类型问题
This commit is contained in:
@@ -81,7 +81,7 @@ function BuiltinStatusLineInner({
|
||||
const tokenDisplay = `${formatTokens(usedTokens)}/${formatTokens(contextWindowSize)}`;
|
||||
|
||||
return (
|
||||
<Box wrap="truncate">
|
||||
<Box>
|
||||
{/* Model name */}
|
||||
<Text>{shortModel}</Text>
|
||||
|
||||
|
||||
@@ -163,7 +163,7 @@ const SuggestionItemRow = memo(function SuggestionItemRow({
|
||||
{paddedDisplayText}
|
||||
</Text>
|
||||
{tagText ? (
|
||||
<Text color={item.tag === 'local' ? ('yellow' as const) : undefined} dimColor={item.tag !== 'local'}>
|
||||
<Text color={item.tag === 'local' ? 'ansi:yellow' : undefined} dimColor={item.tag !== 'local'}>
|
||||
{tagText}
|
||||
</Text>
|
||||
) : null}
|
||||
|
||||
@@ -9,6 +9,7 @@ import {
|
||||
type PromptCommand,
|
||||
} from '../../commands.js'
|
||||
import { Box, Text } from '@anthropic/ink'
|
||||
import type { Theme } from '@anthropic/ink'
|
||||
import {
|
||||
estimateSkillFrontmatterTokens,
|
||||
getSkillsPath,
|
||||
@@ -140,7 +141,7 @@ export function SkillsMenu({ onExit, commands }: Props): React.ReactNode {
|
||||
}
|
||||
|
||||
const getScopeTag = (
|
||||
source: SkillSource,
|
||||
source: string,
|
||||
): { label: string; color: string } | undefined => {
|
||||
switch (source) {
|
||||
case 'projectSettings':
|
||||
@@ -169,6 +170,7 @@ export function SkillsMenu({ onExit, commands }: Props): React.ReactNode {
|
||||
<Text>{getCommandName(skill)}</Text>
|
||||
{scopeTag && (
|
||||
<Text color={scopeTag.color as keyof Theme}> [{scopeTag.label}]</Text>
|
||||
|
||||
)}
|
||||
<Text dimColor>
|
||||
{pluginName ? ` · ${pluginName}` : ''} · {tokenDisplay} description
|
||||
|
||||
@@ -29,6 +29,7 @@ import {
|
||||
formatReviewStageCounts,
|
||||
RemoteSessionProgress,
|
||||
} from './RemoteSessionProgress.js'
|
||||
import { AssistantMessage } from 'src/types/message.js'
|
||||
|
||||
type Props = {
|
||||
session: DeepImmutable<RemoteAgentTaskState>
|
||||
@@ -122,7 +123,7 @@ function UltraplanSessionDetail({
|
||||
let lastBlock: { name: string; input: unknown } | null = null
|
||||
for (const msg of session.log) {
|
||||
if (msg.type !== 'assistant') continue
|
||||
const content = msg.message?.content ?? []
|
||||
const content = (msg.message as { content?: unknown[] })?.content ?? []
|
||||
for (const block of content as Array<{type: string; name: string; input: unknown}>) {
|
||||
if (block.type !== 'tool_use') continue
|
||||
calls++
|
||||
@@ -612,7 +613,7 @@ export function RemoteSessionDetailDialog({
|
||||
{lastMessages.map((msg, i) => (
|
||||
<Message
|
||||
key={i}
|
||||
message={msg}
|
||||
message={msg as AssistantMessage}
|
||||
lookups={EMPTY_LOOKUPS}
|
||||
addMargin={i > 0}
|
||||
tools={toolUseContext.options.tools}
|
||||
|
||||
Reference in New Issue
Block a user