Skip to content

Commit 73de4ec

Browse files
committed
Swap System Prompt / Attach icons around
1 parent 46a7dee commit 73de4ec

File tree

2 files changed

+18
-12
lines changed

2 files changed

+18
-12
lines changed

ServiceStack/src/ServiceStack.AI.Chat/modules/ui/components/ChatMessages.mjs

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -143,18 +143,21 @@ export const ChatMessages = {
143143
<SystemPrompt v-if="showSystemPrompt" v-model="systemPrompt" @done="showSystemPrompt=false" />
144144
</template>
145145
<template #toolbarbuttons="{ instance, textarea }">
146-
<!-- Show System Prompt -->
147-
<button type="button" @click="showSystemPrompt=!showSystemPrompt" title="Show System Prompt"
148-
class="pl-4 border-l border-gray-200">
149-
<svg class="size-5 cursor-pointer select-none text-gray-700 dark:text-gray-300 hover:text-indigo-600 dark:hover:text-indigo-400" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-width="2" d="M1 19h22V1H1zm4 4h14zm3 0h8v-4H8zM7.757 5.757l2.122 2.122zM9 10H6zm.879 2.121l-2.122 2.122zM12 13v3zm2.121-.879l2.122 2.122zM18 10h-3zm-1.757-4.243l-2.122 2.122zM12 7V4zm0 0a3 3 0 1 0 0 6a3 3 0 0 0 0-6Z"/></svg>
150-
</button>
151146
<!-- Attach Files -->
152-
<button type="button" @click="triggerFilePicker" title="Attach image, audio or documents">
147+
<button type="button" @click="triggerFilePicker" title="Attach image, audio or documents"
148+
class="pl-4 border-l border-gray-200">
153149
<svg class="size-5 cursor-pointer select-none text-gray-700 dark:text-gray-300 hover:text-indigo-600 dark:hover:text-indigo-400" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M18 15.75q0 2.6-1.825 4.425T11.75 22t-4.425-1.825T5.5 15.75V6.5q0-1.875 1.313-3.187T10 2t3.188 1.313T14.5 6.5v8.75q0 1.15-.8 1.95t-1.95.8t-1.95-.8t-.8-1.95V6h2v9.25q0 .325.213.538t.537.212t.538-.213t.212-.537V6.5q-.025-1.05-.737-1.775T10 4t-1.775.725T7.5 6.5v9.25q-.025 1.775 1.225 3.013T11.75 20q1.75 0 2.975-1.237T16 15.75V6h2z"/></svg>
154150
</button>
151+
155152
<!-- Hidden file input -->
156153
<input ref="fileInput" type="file" multiple @change="onFilesSelected"
157154
class="hidden" accept="image/*,audio/*,.pdf,.doc,.docx,.xml,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document"
155+
/>
156+
157+
<!-- Show System Prompt -->
158+
<button type="button" @click="showSystemPrompt=!showSystemPrompt" title="Show System Prompt">
159+
<svg class="size-5 cursor-pointer select-none text-gray-700 dark:text-gray-300 hover:text-indigo-600 dark:hover:text-indigo-400" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-width="2" d="M1 19h22V1H1zm4 4h14zm3 0h8v-4H8zM7.757 5.757l2.122 2.122zM9 10H6zm.879 2.121l-2.122 2.122zM12 13v3zm2.121-.879l2.122 2.122zM18 10h-3zm-1.757-4.243l-2.122 2.122zM12 7V4zm0 0a3 3 0 1 0 0 6a3 3 0 0 0 0-6Z"/></svg>
160+
</button>
158161
</template>
159162
</MarkdownInput>
160163
<!-- Attached files preview -->

ServiceStack/tests/NorthwindAuto/ui/components/ChatMessages.mjs

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -143,18 +143,21 @@ export const ChatMessages = {
143143
<SystemPrompt v-if="showSystemPrompt" v-model="systemPrompt" @done="showSystemPrompt=false" />
144144
</template>
145145
<template #toolbarbuttons="{ instance, textarea }">
146-
<!-- Show System Prompt -->
147-
<button type="button" @click="showSystemPrompt=!showSystemPrompt" title="Show System Prompt"
148-
class="pl-4 border-l border-gray-200">
149-
<svg class="size-5 cursor-pointer select-none text-gray-700 dark:text-gray-300 hover:text-indigo-600 dark:hover:text-indigo-400" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-width="2" d="M1 19h22V1H1zm4 4h14zm3 0h8v-4H8zM7.757 5.757l2.122 2.122zM9 10H6zm.879 2.121l-2.122 2.122zM12 13v3zm2.121-.879l2.122 2.122zM18 10h-3zm-1.757-4.243l-2.122 2.122zM12 7V4zm0 0a3 3 0 1 0 0 6a3 3 0 0 0 0-6Z"/></svg>
150-
</button>
151146
<!-- Attach Files -->
152-
<button type="button" @click="triggerFilePicker" title="Attach image, audio or documents">
147+
<button type="button" @click="triggerFilePicker" title="Attach image, audio or documents"
148+
class="pl-4 border-l border-gray-200">
153149
<svg class="size-5 cursor-pointer select-none text-gray-700 dark:text-gray-300 hover:text-indigo-600 dark:hover:text-indigo-400" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M18 15.75q0 2.6-1.825 4.425T11.75 22t-4.425-1.825T5.5 15.75V6.5q0-1.875 1.313-3.187T10 2t3.188 1.313T14.5 6.5v8.75q0 1.15-.8 1.95t-1.95.8t-1.95-.8t-.8-1.95V6h2v9.25q0 .325.213.538t.537.212t.538-.213t.212-.537V6.5q-.025-1.05-.737-1.775T10 4t-1.775.725T7.5 6.5v9.25q-.025 1.775 1.225 3.013T11.75 20q1.75 0 2.975-1.237T16 15.75V6h2z"/></svg>
154150
</button>
151+
155152
<!-- Hidden file input -->
156153
<input ref="fileInput" type="file" multiple @change="onFilesSelected"
157154
class="hidden" accept="image/*,audio/*,.pdf,.doc,.docx,.xml,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document"
155+
/>
156+
157+
<!-- Show System Prompt -->
158+
<button type="button" @click="showSystemPrompt=!showSystemPrompt" title="Show System Prompt">
159+
<svg class="size-5 cursor-pointer select-none text-gray-700 dark:text-gray-300 hover:text-indigo-600 dark:hover:text-indigo-400" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-width="2" d="M1 19h22V1H1zm4 4h14zm3 0h8v-4H8zM7.757 5.757l2.122 2.122zM9 10H6zm.879 2.121l-2.122 2.122zM12 13v3zm2.121-.879l2.122 2.122zM18 10h-3zm-1.757-4.243l-2.122 2.122zM12 7V4zm0 0a3 3 0 1 0 0 6a3 3 0 0 0 0-6Z"/></svg>
160+
</button>
158161
</template>
159162
</MarkdownInput>
160163
<!-- Attached files preview -->

0 commit comments

Comments
 (0)