feat(tool-feedback): add separate message mode for chat feedback (#2644)
* feat(tool-feedback): add separate message mode for chat feedback * add parameter in conf
This commit is contained in:
1 parent
0d1b041d74
commit
9fc72c1fb3
12 files changed
+292
-16
No files matched your search
@@ -244,6 +244,7 @@ export function ConfigPage() {
|
||||
tool_feedback: {
|
||||
enabled: form.toolFeedbackEnabled,
|
||||
max_args_length: toolFeedbackMaxArgsLength,
|
||||
separate_messages: form.toolFeedbackSeparateMessages,
|
||||
},
|
||||
max_tokens: maxTokens,
|
||||
context_window: contextWindow,
|
||||
|
||||
@@ -113,6 +113,18 @@ export function AgentDefaultsSection({
|
||||
}
|
||||
/>
|
||||
|
||||
{form.toolFeedbackEnabled && (
|
||||
<SwitchCardField
|
||||
label={t("pages.config.tool_feedback_separate_messages")}
|
||||
hint={t("pages.config.tool_feedback_separate_messages_hint")}
|
||||
layout="setting-row"
|
||||
checked={form.toolFeedbackSeparateMessages}
|
||||
onCheckedChange={(checked) =>
|
||||
onFieldChange("toolFeedbackSeparateMessages", checked)
|
||||
}
|
||||
/>
|
||||
)}
|
||||
|
||||
{form.toolFeedbackEnabled && (
|
||||
<Field
|
||||
label={t("pages.config.tool_feedback_max_args_length")}
|
||||
|
||||
@@ -6,6 +6,7 @@ export interface CoreConfigForm {
|
||||
splitOnMarker: boolean
|
||||
toolFeedbackEnabled: boolean
|
||||
toolFeedbackMaxArgsLength: string
|
||||
toolFeedbackSeparateMessages: boolean
|
||||
execEnabled: boolean
|
||||
allowRemote: boolean
|
||||
enableDenyPatterns: boolean
|
||||
@@ -71,6 +72,7 @@ export const EMPTY_FORM: CoreConfigForm = {
|
||||
splitOnMarker: false,
|
||||
toolFeedbackEnabled: false,
|
||||
toolFeedbackMaxArgsLength: "300",
|
||||
toolFeedbackSeparateMessages: false,
|
||||
execEnabled: true,
|
||||
allowRemote: true,
|
||||
enableDenyPatterns: true,
|
||||
@@ -154,6 +156,10 @@ export function buildFormFromConfig(config: unknown): CoreConfigForm {
|
||||
toolFeedback.max_args_length,
|
||||
EMPTY_FORM.toolFeedbackMaxArgsLength,
|
||||
),
|
||||
toolFeedbackSeparateMessages:
|
||||
toolFeedback.separate_messages === undefined
|
||||
? EMPTY_FORM.toolFeedbackSeparateMessages
|
||||
: asBool(toolFeedback.separate_messages),
|
||||
execEnabled:
|
||||
exec.enabled === undefined
|
||||
? EMPTY_FORM.execEnabled
|
||||
|
||||
Reference in new issue
Block a user