Merge pull request #5473 from continuedev/nate/fixes-8014
Small error / warning message updates
This commit is contained in:
commit
2bfe7948c0
6 changed files with 13 additions and 8 deletions
|
|
@ -1 +0,0 @@
|
|||
Give concise responses.
|
||||
|
|
@ -355,7 +355,7 @@ function compileChatMessages({
|
|||
lastToolCallsMsg = msgsCopy.pop();
|
||||
if (!messageHasToolCallId(lastToolCallsMsg, lastUserOrToolMsg.toolCallId)) {
|
||||
throw new Error(
|
||||
`Error parsing chat history: tool call found to match tool output for id ${lastUserOrToolMsg.toolCallId}`,
|
||||
`Error parsing chat history: no tool call found to match tool output for id "${lastUserOrToolMsg.toolCallId}"`,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -189,7 +189,7 @@ chat, editing, and summarizing.
|
|||
- `promptTemplates`: Can be used to override the default prompt templates for different model roles. Valid values are
|
||||
`chat`, [`edit`](./customize/model-roles/edit.mdx#prompt-templating), [
|
||||
`apply`](./customize/model-roles/apply.mdx#prompt-templating) and [
|
||||
`autocomplete`](./customize/model-roles/autocomplete.md#prompt-templating). The `chatTemplate` property must be a
|
||||
`autocomplete`](./customize/model-roles/autocomplete.md#prompt-templating). The `chat` property must be a
|
||||
valid template name, such as `llama3` or `anthropic`.
|
||||
- `chatOptions`: If the model includes role `chat`, these settings apply for Chat and Agent mode:
|
||||
- `baseSystemMessage`: Can be used to override the default system prompt for **Chat** mode.
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ const statusBarItemText = (
|
|||
error?: boolean,
|
||||
) => {
|
||||
if (error) {
|
||||
return "$(alert) Continue (FATAL ERROR)";
|
||||
return "$(alert) Continue (config error)";
|
||||
}
|
||||
|
||||
switch (status) {
|
||||
|
|
|
|||
|
|
@ -22,6 +22,10 @@ interface StreamErrorProps {
|
|||
}
|
||||
|
||||
function parseErrorMessage(fullErrMsg: string): string {
|
||||
if (!fullErrMsg.includes("\n\n")) {
|
||||
return fullErrMsg;
|
||||
}
|
||||
|
||||
const msg = fullErrMsg.split("\n\n").slice(1).join("\n\n");
|
||||
try {
|
||||
const parsed = JSON.parse(msg);
|
||||
|
|
@ -228,7 +232,9 @@ const StreamErrorDialog = ({ error }: StreamErrorProps) => {
|
|||
|
||||
return (
|
||||
<div className={`flex flex-col gap-1 px-3 pb-2 pt-3`}>
|
||||
<p className="m-0 p-0 text-lg text-red-500">{`Error (status code ${statusCode})`}</p>
|
||||
<p className="m-0 p-0 text-lg text-red-500">
|
||||
{statusCode ? `Error (status code ${statusCode})` : "Error"}
|
||||
</p>
|
||||
|
||||
{message ? (
|
||||
<div className="mt-2 flex flex-col gap-0 rounded-sm">
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import { ChevronDownIcon, ChevronRightIcon } from "@heroicons/react/24/outline";
|
|||
import { ContextItemWithId, Tool, ToolCallState } from "core";
|
||||
import { ComponentType, useMemo, useState } from "react";
|
||||
import { ContextItemsPeekItem } from "../../../components/mainInput/belowMainInput/ContextItemsPeek";
|
||||
import { ArgsItems, ArgsToggleIcon } from "./ToolCallArgs";
|
||||
import { ArgsItems } from "./ToolCallArgs";
|
||||
import { ToolCallStatusMessage } from "./ToolCallStatusMessage";
|
||||
|
||||
interface SimpleToolCallUIProps {
|
||||
|
|
@ -66,7 +66,7 @@ export function SimpleToolCallUI({
|
|||
<ToolCallStatusMessage tool={tool} toolCallState={toolCallState} />
|
||||
</span>
|
||||
</div>
|
||||
<div>
|
||||
{/* <div>
|
||||
{args.length > 0 ? (
|
||||
<ArgsToggleIcon
|
||||
isShowing={showingArgs}
|
||||
|
|
@ -74,7 +74,7 @@ export function SimpleToolCallUI({
|
|||
toolCallId={toolCallState.toolCallId}
|
||||
/>
|
||||
) : null}
|
||||
</div>
|
||||
</div> */}
|
||||
</div>
|
||||
<ArgsItems args={args} isShowing={showingArgs} />
|
||||
<div
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue