mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-18 22:35:51 +00:00
feat: integrate fork work onto upstream main (squashed)
Squash-merge of feat/autofix-pr-test (69 commits) onto upstream/main with -X ours strategy (upstream as authoritative for content conflicts). Key features brought in from fork: - LocalMemoryRecall + VaultHttpFetch tools (end-to-end wired) - /local-memory, /local-vault, /memory-stores, /skill-store interactive panels - /agents-platform, /schedule, /vault command scaffolding - /login: switch / replace / remove of workspace API key - statusline refactor (built-in status row, /statusline as info command) - autofix-pr command + workflow Conflict resolutions (upstream-wins): - 10 .js command stubs kept from upstream (alongside fork's .ts implementations) - src/components/BuiltinStatusLine.tsx accepted upstream's deletion (fork's wire-up references in StatusLine.tsx will be cleaned up next) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
48
packages/builtin-tools/src/tools/VaultHttpFetchTool/UI.tsx
Normal file
48
packages/builtin-tools/src/tools/VaultHttpFetchTool/UI.tsx
Normal file
@@ -0,0 +1,48 @@
|
||||
import * as React from 'react';
|
||||
import { Text } from '@anthropic/ink';
|
||||
import { MessageResponse } from 'src/components/MessageResponse.js';
|
||||
import { OutputLine } from 'src/components/shell/OutputLine.js';
|
||||
import type { ToolProgressData } from 'src/Tool.js';
|
||||
import type { ProgressMessage } from 'src/types/message.js';
|
||||
import { jsonStringify } from 'src/utils/slowOperations.js';
|
||||
import type { Output } from './VaultHttpFetchTool.js';
|
||||
|
||||
// H6 fix: second `options` parameter matches Tool interface contract.
|
||||
export function renderToolUseMessage(
|
||||
input: Partial<{
|
||||
method?: string;
|
||||
url?: string;
|
||||
vault_auth_key?: string;
|
||||
}>,
|
||||
_options: {
|
||||
theme?: unknown;
|
||||
verbose?: boolean;
|
||||
commands?: unknown;
|
||||
} = {},
|
||||
): React.ReactNode {
|
||||
void _options;
|
||||
const method = input.method ?? 'GET';
|
||||
const key = input.vault_auth_key ?? '?';
|
||||
const url = input.url ?? '';
|
||||
// Show key NAME (already required to be non-secret); no secret value involved.
|
||||
return `${method} ${url} (vault: ${key})`;
|
||||
}
|
||||
|
||||
export function renderToolResultMessage(
|
||||
output: Output,
|
||||
_progressMessagesForMessage: ProgressMessage<ToolProgressData>[],
|
||||
{ verbose }: { verbose: boolean },
|
||||
): React.ReactNode {
|
||||
if (output.error) {
|
||||
return (
|
||||
<MessageResponse height={1}>
|
||||
<Text color="error">VaultHttpFetch: {output.error}</Text>
|
||||
</MessageResponse>
|
||||
);
|
||||
}
|
||||
// Body has already been scrubbed of secret forms before reaching here;
|
||||
// safe to display.
|
||||
// eslint-disable-next-line no-restricted-syntax -- human-facing UI, not tool_result
|
||||
const formatted = jsonStringify(output, null, 2);
|
||||
return <OutputLine content={formatted} verbose={verbose} />;
|
||||
}
|
||||
Reference in New Issue
Block a user