fix key err
This commit is contained in:
parent
832927553a
commit
e992e1ff29
5 changed files with 17 additions and 13 deletions
|
|
@ -505,8 +505,8 @@ async function intermediateToFinalConfig(
|
|||
mcpConnection.modifyConfig(continueConfig),
|
||||
new Promise((_, reject) =>
|
||||
setTimeout(
|
||||
() => reject(new Error("MCP connection timed out after 1000ms")),
|
||||
1000,
|
||||
() => reject(new Error("MCP connection timed out after 2000ms")),
|
||||
2000,
|
||||
),
|
||||
),
|
||||
]).catch((error) => {
|
||||
|
|
|
|||
|
|
@ -8,14 +8,15 @@ export const exactSearchTool: Tool = {
|
|||
readonly: true,
|
||||
function: {
|
||||
name: BuiltInToolNames.ExactSearch,
|
||||
description: "Perform an exact search over the repository using ripgrep",
|
||||
description: "Perform an exact search over the repository using ripgrep.",
|
||||
parameters: {
|
||||
type: "object",
|
||||
required: ["query"],
|
||||
properties: {
|
||||
query: {
|
||||
type: "string",
|
||||
description: "The search query to use",
|
||||
description:
|
||||
"The search query to use. Must be a valid ripgrep regex expression, escaped where needed",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -371,11 +371,13 @@ export function Chat() {
|
|||
<div>
|
||||
{item.message.toolCalls?.map((toolCall, i) => {
|
||||
return (
|
||||
<ToolCallDiv
|
||||
key={i}
|
||||
toolCallState={item.toolCallState}
|
||||
toolCall={toolCall as any}
|
||||
/>
|
||||
<div key={i}>
|
||||
<ToolCallDiv
|
||||
reactKey={toolCall.id}
|
||||
toolCallState={item.toolCallState}
|
||||
toolCall={toolCall as any}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ interface ThreadDivProps {
|
|||
icon: React.ReactNode;
|
||||
toolCall: ToolCall;
|
||||
toolCallState: ToolCallState;
|
||||
key: number;
|
||||
reactKey: string;
|
||||
}
|
||||
|
||||
const Container = styled.div`
|
||||
|
|
@ -51,7 +51,7 @@ export function ThreadDiv(props: ThreadDivProps) {
|
|||
}
|
||||
|
||||
return (
|
||||
<Container key={props.key}>
|
||||
<Container key={props.reactKey}>
|
||||
<HeaderDiv>
|
||||
<div
|
||||
style={{
|
||||
|
|
@ -59,6 +59,7 @@ export function ThreadDiv(props: ThreadDivProps) {
|
|||
height: `${W}px`,
|
||||
fontWeight: "bolder",
|
||||
marginTop: "1px",
|
||||
flexShrink: 0,
|
||||
}}
|
||||
>
|
||||
{props.icon}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ import { ThreadDiv } from "./ThreadDiv";
|
|||
interface ToolCallDivProps {
|
||||
toolCall: ToolCall;
|
||||
toolCallState: ToolCallState;
|
||||
key: number;
|
||||
reactKey: string;
|
||||
}
|
||||
|
||||
export function ToolCallDiv(props: ToolCallDivProps) {
|
||||
|
|
@ -32,7 +32,7 @@ export function ToolCallDiv(props: ToolCallDivProps) {
|
|||
|
||||
return (
|
||||
<ThreadDiv
|
||||
key={props.key}
|
||||
reactKey={props.reactKey}
|
||||
icon={getIcon(props.toolCallState.status)}
|
||||
toolCall={props.toolCall}
|
||||
toolCallState={props.toolCallState}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue