Skip to content

Commit a3dd6fb

Browse files
authored
fix: scope search prose whitespace overrides (#653)
Signed-off-by: Bob Du <[email protected]>
1 parent 95b499f commit a3dd6fb

File tree

3 files changed

+3
-47
lines changed

3 files changed

+3
-47
lines changed

src/views/chat/components/Message/Search.vue

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -157,47 +157,3 @@ function toggleCollapse() {
157157
</div>
158158
</div>
159159
</template>
160-
161-
<style lang="less">
162-
@import url(./style.less);
163-
164-
.prose {
165-
code {
166-
background-color: rgba(147,197,253,0.3);
167-
padding: .2em .4em;
168-
margin: 0;
169-
font-size: 85%;
170-
border-radius: 3px;
171-
}
172-
pre {
173-
background-color: rgba(191,219,254,1);
174-
color: rgba(30,58,138,1);
175-
padding: 0.75rem;
176-
border-radius: 0.25rem;
177-
overflow-x: auto;
178-
code {
179-
background-color: transparent;
180-
padding: 0;
181-
margin: 0;
182-
font-size: inherit;
183-
border-radius: 0;
184-
color: inherit;
185-
}
186-
}
187-
}
188-
.dark .prose {
189-
color: rgba(191,219,254,1);
190-
code {
191-
background-color: rgba(30,58,138,0.5);
192-
color: rgba(219,234,254,1);
193-
}
194-
pre {
195-
background-color: rgba(30,64,175,0.3);
196-
color: rgba(219,234,254,1);
197-
}
198-
}
199-
200-
.whitespace-pre-wrap {
201-
white-space: normal;
202-
}
203-
</style>

src/views/chat/components/Message/Text.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,9 @@ onUnmounted(() => {
109109
<div ref="textRef" class="leading-relaxed break-words">
110110
<div v-if="!inversion" class="flex items-end">
111111
<div v-if="!asRawText" class="w-full markdown-body" :class="{ 'markdown-body-generate': loading }" v-html="text" />
112-
<div v-else class="w-full whitespace-pre-wrap" v-text="text" />
112+
<div v-else class="w-full whitespace-pre-wrap break-words" v-text="text" />
113113
</div>
114-
<div v-else class="whitespace-pre-wrap" v-text="text" />
114+
<div v-else class="w-full whitespace-pre-wrap break-words" v-text="text" />
115115
<img v-for="(v, i) of images" :key="i" :src="`/uploads/${v}`" alt="" width="160px">
116116
</div>
117117
</div>

src/views/chat/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1038,7 +1038,7 @@ onUnmounted(() => {
10381038
:disabled="!!authStore.session?.auth && !authStore.token && !authStore.session?.authProxyEnabled"
10391039
type="textarea"
10401040
:placeholder="placeholder"
1041-
:autosize="{ minRows: isMobile ? 1 : 2, maxRows: isMobile ? 4 : 12 }"
1041+
:autosize="{ minRows: isMobile ? 2 : 3, maxRows: isMobile ? 4 : 12 }"
10421042
@input="handleInput"
10431043
@focus="handleFocus"
10441044
@blur="handleBlur"

0 commit comments

Comments
 (0)