mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-20 08:47:44 +00:00
Fix remaining tslint errors (YAY).
- Also updated ci.yml to ensure that linting failures will break the build. Fully fixes https://b.corp.google.com/issues/411384603
This commit is contained in:
committed by
N. Taylor Mullen
parent
2a850ed051
commit
40e11e053c
@@ -6,9 +6,9 @@ import {
|
||||
ToolEditConfirmationDetails,
|
||||
ToolConfirmationOutcome,
|
||||
ToolExecuteConfirmationDetails,
|
||||
} from '../../types.js'; // Adjust path as needed
|
||||
} from '../../types.js';
|
||||
import { PartListUnion } from '@google/genai';
|
||||
import DiffRenderer from './DiffRenderer.js';
|
||||
import { DiffRenderer } from './DiffRenderer.js';
|
||||
import { UI_WIDTH } from '../../constants.js';
|
||||
|
||||
export interface ToolConfirmationMessageProps {
|
||||
@@ -27,9 +27,9 @@ interface InternalOption {
|
||||
value: ToolConfirmationOutcome;
|
||||
}
|
||||
|
||||
const ToolConfirmationMessage: React.FC<ToolConfirmationMessageProps> = ({
|
||||
confirmationDetails,
|
||||
}) => {
|
||||
export const ToolConfirmationMessage: React.FC<
|
||||
ToolConfirmationMessageProps
|
||||
> = ({ confirmationDetails }) => {
|
||||
const { onConfirm } = confirmationDetails;
|
||||
|
||||
useInput((_, key) => {
|
||||
@@ -42,14 +42,11 @@ const ToolConfirmationMessage: React.FC<ToolConfirmationMessageProps> = ({
|
||||
onConfirm(item.value);
|
||||
};
|
||||
|
||||
let title: string;
|
||||
let bodyContent: React.ReactNode | null = null; // Removed contextDisplay here
|
||||
let question: string;
|
||||
const options: InternalOption[] = [];
|
||||
|
||||
if (isEditDetails(confirmationDetails)) {
|
||||
title = 'Edit'; // Title for the outer box
|
||||
|
||||
// Body content is now the DiffRenderer, passing filename to it
|
||||
// The bordered box is removed from here and handled within DiffRenderer
|
||||
bodyContent = <DiffRenderer diffContent={confirmationDetails.fileDiff} />;
|
||||
@@ -69,7 +66,6 @@ const ToolConfirmationMessage: React.FC<ToolConfirmationMessageProps> = ({
|
||||
} else {
|
||||
const executionProps =
|
||||
confirmationDetails as ToolExecuteConfirmationDetails;
|
||||
title = 'Execute Command'; // Title for the outer box
|
||||
|
||||
// For execution, we still need context display and description
|
||||
const commandDisplay = <Text color="cyan">{executionProps.command}</Text>;
|
||||
@@ -118,5 +114,3 @@ const ToolConfirmationMessage: React.FC<ToolConfirmationMessageProps> = ({
|
||||
</Box>
|
||||
);
|
||||
};
|
||||
|
||||
export default ToolConfirmationMessage;
|
||||
|
||||
Reference in New Issue
Block a user