From 3b7e1b7761260cd6f3a56d27cf4fa0e5c2630a78 Mon Sep 17 00:00:00 2001 From: Jicheng Lu <103353@smsassist.com> Date: Tue, 26 May 2026 11:05:00 -0500 Subject: [PATCH 1/2] refine instruction testing --- src/lib/common/modals/StateModal.svelte | 2 +- .../instruction-agent.svelte | 8 +- .../instruction-llm.svelte | 95 ++++++++++++++++++- .../instruction-state.svelte | 2 +- .../page/instruction/testing/+page.svelte | 50 +++++++--- 5 files changed, 138 insertions(+), 19 deletions(-) diff --git a/src/lib/common/modals/StateModal.svelte b/src/lib/common/modals/StateModal.svelte index ee6fecdb..c489007c 100644 --- a/src/lib/common/modals/StateModal.svelte +++ b/src/lib/common/modals/StateModal.svelte @@ -217,7 +217,7 @@
{#if idx === 0} {/if} void + * onSelectAgent?: (detail: { agent: import('$agentTypes').AgentModel | null, template: any, llmConfig: any }) => void * }} */ let { @@ -45,7 +45,8 @@ name: x.name, label: x.name, value: x.name, - content: x.content + content: x.content, + llm_config: x.llm_config || null })) || []; fireSelectAgent(); @@ -62,7 +63,8 @@ function fireSelectAgent() { onSelectAgent?.({ agent: selectedAgent || null, - template: selectedTemplate || null + template: selectedTemplate || null, + llmConfig: selectedTemplate?.llm_config || selectedAgent?.llm_config || null }); } diff --git a/src/routes/page/instruction/instruction-components/instruction-llm.svelte b/src/routes/page/instruction/instruction-components/instruction-llm.svelte index fb4e02f0..5c2157bb 100644 --- a/src/routes/page/instruction/instruction-components/instruction-llm.svelte +++ b/src/routes/page/instruction/instruction-components/instruction-llm.svelte @@ -1,5 +1,7 @@ @@ -92,4 +150,37 @@ onselect={e => selectModel(e)} />
+ +
+ + validateIntegerInput(e)} + onchange={e => changeMaxOutputTokens(e)} + /> +
+ + {#if isReasoningModel} +
+ + -
edit()}> +
edit()} + > {#if !!value?.trim()} - {value} + {value} {:else} - {placeholder} + {placeholder} {/if} +
-{/if} \ No newline at end of file +{/if} + + \ No newline at end of file diff --git a/src/lib/styles/pages/_agent.scss b/src/lib/styles/pages/_agent.scss index 1d937d23..a6819455 100644 --- a/src/lib/styles/pages/_agent.scss +++ b/src/lib/styles/pages/_agent.scss @@ -898,6 +898,18 @@ .ao-chat-btn { animation: none; } } +@media (max-width: 768px) { + .ao-chat-btn { + gap: 0; + padding: 0; + width: 1.875rem; + justify-content: center; + } + .ao-chat-btn-label { + display: none; + } +} + .ao-name { margin: 0.25rem 0; diff --git a/src/routes/VerticalLayout/Header.svelte b/src/routes/VerticalLayout/Header.svelte index a9892047..9682984c 100644 --- a/src/routes/VerticalLayout/Header.svelte +++ b/src/routes/VerticalLayout/Header.svelte @@ -95,7 +95,7 @@ {/if} diff --git a/src/routes/page/conversation/[conversationId]/conv-states.svelte b/src/routes/page/conversation/[conversationId]/conv-states.svelte index ba718d03..3ff9bcc0 100644 --- a/src/routes/page/conversation/[conversationId]/conv-states.svelte +++ b/src/routes/page/conversation/[conversationId]/conv-states.svelte @@ -23,6 +23,7 @@