Skip to content

Commit 1b98e35

Browse files
feat: chat
1 parent afada6f commit 1b98e35

File tree

3 files changed

+50
-50
lines changed

3 files changed

+50
-50
lines changed

ui/src/components/ai-chat/component/chat-input-operate/index.vue

Lines changed: 43 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -156,35 +156,48 @@
156156
</el-space>
157157
</div>
158158
</el-scrollbar>
159-
<div class="flex" :style="{ alignItems: isMicrophone ? 'center' : 'end' }">
160-
<TouchChat
161-
v-if="isMicrophone"
162-
@TouchStart="startRecording"
163-
@TouchEnd="TouchEnd"
164-
:time="recorderTime"
165-
:start="recorderStatus === 'START'"
166-
:disabled="loading"
167-
/>
168-
<el-input
169-
v-else
170-
ref="quickInputRef"
171-
v-model="inputValue"
172-
:placeholder="
173-
recorderStatus === 'START'
174-
? `${$t('chat.inputPlaceholder.speaking')}...`
175-
: recorderStatus === 'TRANSCRIBING'
176-
? `${$t('chat.inputPlaceholder.recorderLoading')}...`
177-
: $t('chat.inputPlaceholder.default')
178-
"
179-
:autosize="{ minRows: 1, maxRows: isMobile ? 4 : 10 }"
180-
type="textarea"
181-
:maxlength="100000"
182-
@keydown.enter="sendChatHandle($event)"
183-
@paste="handlePaste"
184-
@drop="handleDrop"
185-
/>
186-
187-
<div class="operate flex align-center">
159+
160+
<TouchChat
161+
v-if="isMicrophone"
162+
@TouchStart="startRecording"
163+
@TouchEnd="TouchEnd"
164+
:time="recorderTime"
165+
:start="recorderStatus === 'START'"
166+
:disabled="loading"
167+
/>
168+
<el-input
169+
v-else
170+
ref="quickInputRef"
171+
v-model="inputValue"
172+
:placeholder="
173+
recorderStatus === 'START'
174+
? `${$t('chat.inputPlaceholder.speaking')}...`
175+
: recorderStatus === 'TRANSCRIBING'
176+
? `${$t('chat.inputPlaceholder.recorderLoading')}...`
177+
: $t('chat.inputPlaceholder.default')
178+
"
179+
:autosize="{ minRows: 1, maxRows: isMobile ? 4 : 10 }"
180+
type="textarea"
181+
:maxlength="100000"
182+
@keydown.enter="sendChatHandle($event)"
183+
@paste="handlePaste"
184+
@drop="handleDrop"
185+
/>
186+
187+
<div class="operate flex-between">
188+
<div>
189+
<!-- <el-button
190+
v-if="isUserInput || isAPIInput"
191+
class="user-input-button mb-8"
192+
type="primary"
193+
text
194+
@click="toggleUserInput"
195+
>
196+
<AppIcon iconName="app-user-input"></AppIcon>
197+
</el-button> -->
198+
</div>
199+
200+
<div>
188201
<template v-if="props.applicationDetails.stt_model_enable">
189202
<span v-if="mode === 'mobile'">
190203
<el-button text @click="switchMicrophone(!isMicrophone)">
@@ -277,6 +290,7 @@
277290
</div>
278291
</div>
279292
</div>
293+
280294
<div class="text-center" v-if="applicationDetails.disclaimer" style="margin-top: 8px">
281295
<el-text type="info" v-if="applicationDetails.disclaimer" style="font-size: 12px">
282296
<auto-tooltip :content="applicationDetails.disclaimer_value">

ui/src/components/ai-chat/index.vue

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -74,21 +74,9 @@
7474
v-if="type !== 'log'"
7575
>
7676
<template #operateBefore>
77-
<div class="flex-between">
78-
<slot name="operateBefore">
79-
<span></span>
80-
</slot>
81-
82-
<el-button
83-
v-if="isUserInput || isAPIInput"
84-
class="user-input-button mb-8"
85-
type="primary"
86-
text
87-
@click="toggleUserInput"
88-
>
89-
<AppIcon iconName="app-user-input"></AppIcon>
90-
</el-button>
91-
</div>
77+
<slot name="operateBefore">
78+
<span></span>
79+
</slot>
9280
</template>
9381
</ChatInputOperate>
9482

ui/src/views/chat/pc/index.vue

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,7 @@
2626
<h4>{{ applicationDetail?.name }}</h4>
2727
</div>
2828
<el-button class="add-button w-full primary" @click="newChat">
29-
<el-icon>
30-
<Plus />
31-
</el-icon>
29+
<AppIcon iconName="app-create-chat"></AppIcon>
3230
<span class="ml-4">{{ $t('chat.createChat') }}</span>
3331
</el-button>
3432
<p class="mt-20 mb-8">{{ $t('chat.history') }}</p>
@@ -420,7 +418,7 @@ onMounted(() => {
420418
}
421419
422420
.left-height {
423-
height: calc(100vh - var(--app-header-height) - 85px);
421+
height: calc(100vh - 140px);
424422
}
425423
}
426424
@@ -431,7 +429,7 @@ onMounted(() => {
431429
box-sizing: border-box;
432430
433431
.right-height {
434-
height: calc(100vh - var(--app-header-height) * 2 - 24px);
432+
height: calc(100vh - 85px);
435433
}
436434
}
437435
@@ -489,7 +487,7 @@ onMounted(() => {
489487
position: fixed;
490488
width: 100%;
491489
z-index: 99;
492-
height: calc(100vh - var(--app-header-height) + 6px);
490+
height: calc(100vh);
493491
}
494492
}
495493
.collapse {

0 commit comments

Comments
 (0)