Skip to content

Commit 1e9cf69

Browse files
authored
Merge pull request #1 from NativeMindBrowser/dev
Merge: merge dev into main (1.2.0)
2 parents f4738f6 + 8a02ae1 commit 1e9cf69

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+364
-118
lines changed

CHANGELOG.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,40 @@
11
# Changelog
22

33

4+
## v1.2.0-beta.4
5+
6+
[compare changes](https://github.com/NativeMindBrowser/NativeMindExtension/compare/v1.2.0-beta.3...v1.2.0-beta.4)
7+
8+
### 🚀 Enhancements
9+
10+
- **style:** Update ModelSelector container position ([1ddfcba](https://github.com/NativeMindBrowser/NativeMindExtension/commit/1ddfcba))
11+
12+
### ❤️ Contributors
13+
14+
- Tony Hu ([@tonyhu-012](http://github.com/tonyhu-012))
15+
16+
## v1.2.0-beta.3
17+
18+
[compare changes](https://github.com/NativeMindBrowser/NativeMindExtension/compare/v1.2.0-beta.2...v1.2.0-beta.3)
19+
20+
### 🩹 Fixes
21+
22+
- Implement URL validation and timeout handling for url like chrome webstore ([8e4726a](https://github.com/NativeMindBrowser/NativeMindExtension/commit/8e4726a))
23+
- Adjust textarea height handling and update tab selection order ([441d2d0](https://github.com/NativeMindBrowser/NativeMindExtension/commit/441d2d0))
24+
25+
### 💅 Refactors
26+
27+
- **auto-imports:** Disable auto imports ([8bb6192](https://github.com/NativeMindBrowser/NativeMindExtension/commit/8bb6192))
28+
- **lint:** Update eslint rules ([eda482f](https://github.com/NativeMindBrowser/NativeMindExtension/commit/eda482f))
29+
30+
### ❤️ Contributors
31+
32+
- Tony Hu ([@tonyhu-012](http://github.com/tonyhu-012))
33+
34+
## v1.2.0-beta.2
35+
36+
[compare changes](https://github.com/NativeMindBrowser/NativeMindExtension/compare/v1.2.0-beta.1...v1.2.0-beta.2)
37+
438
## v1.2.0-beta.1
539

640

app.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { defineAppConfig } from '#imports'
1+
import { defineAppConfig } from 'wxt/utils/define-app-config'
22

33
// Define types for your config
44
declare module 'wxt/utils/define-app-config' {

components/AutoExpandTextArea.vue

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@
77
@input="onInput"
88
/>
99
</template>
10+
1011
<script setup lang="ts">
1112
import { useVModel } from '@vueuse/core'
13+
import { nextTick, ref, watch } from 'vue'
1214
1315
const emit = defineEmits<{
1416
(e: 'input', ev: Event): void
@@ -19,18 +21,23 @@ const props = defineProps<{
1921
modelValue?: string
2022
}>()
2123
24+
const textareaRef = ref<HTMLTextAreaElement | null>(null)
2225
const inputValue = useVModel(props, 'modelValue', emit, {
23-
passive: true,
2426
eventName: 'update:modelValue',
2527
})
2628
27-
const onInput = (event: Event) => {
28-
emit('input', event)
29-
const textarea = event.target as HTMLTextAreaElement
29+
watch(inputValue, async () => {
30+
await nextTick()
31+
const textarea = textareaRef.value as HTMLTextAreaElement
32+
if (!textarea) return
3033
textarea.style.height = 'auto' // Reset height to auto to shrink if needed
3134
// force a reflow to ensure the height is recalculated
3235
const _ = textarea.offsetHeight
3336
const scrollHeight = textarea.scrollHeight
3437
textarea.style.height = `${scrollHeight}px` // Set height to scrollHeight to expand
38+
})
39+
40+
const onInput = (event: Event) => {
41+
emit('input', event)
3542
}
3643
</script>

components/Checkbox.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
>
1010
</div>
1111
</template>
12+
1213
<script setup lang="ts">
1314
import { useVModel } from '@vueuse/core'
1415

components/Input.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
:class="classNames('relative focus:shadow-[0px_0px_0px_1px_#24B960] rounded-[6px] shadow-[0px_0px_0px_1px_rgba(0,0,0,0.08),0px_1px_2px_0px_rgba(0,0,0,0.12)] p-2 outline-none', props.class)"
55
>
66
</template>
7+
78
<script setup lang="tsx">
89
import { useVModel } from '@vueuse/core'
910

components/Loading.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
/>
1212
</div>
1313
</template>
14+
1415
<script setup lang="ts">
1516
withDefaults(
1617
defineProps<{

components/Modal.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,12 @@
5757
</div>
5858
</Teleport>
5959
</template>
60+
6061
<script lang="ts">
6162
import { useElementBounding } from '@vueuse/core'
62-
import { reactive } from 'vue'
63+
import { computed, reactive, ref, watch } from 'vue'
6364
65+
import { useInjectContext } from '@/composables/useInjectContext'
6466
import { classNames, ComponentClassAttr } from '@/utils/vue/utils'
6567
6668
const modalStack: { close(): void, canCloseByEsc(): boolean }[] = reactive([])
@@ -74,6 +76,7 @@ const onEscPressed = (e: KeyboardEvent) => {
7476
7577
window.addEventListener('keydown', onEscPressed, false)
7678
</script>
79+
7780
<script setup lang="ts">
7881
import IconClose from '@/assets/icons/close.svg?component'
7982
import { useZIndex } from '@/composables/useZIndex'
@@ -201,6 +204,7 @@ const onClose = () => {
201204
props.onClose?.()
202205
}
203206
</script>
207+
204208
<style lang="scss" scoped>
205209
@keyframes fade-in {
206210
from {

components/ModelLogo.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@
66
/>
77
</div>
88
</template>
9+
910
<script setup lang="ts">
11+
import { computed } from 'vue'
12+
1013
import LogoCohere from '@/assets/icons/model-logo-cohere.svg?component'
1114
import LogoDeepseek from '@/assets/icons/model-logo-deepseek.svg?component'
1215
import LogoFallback from '@/assets/icons/model-logo-fallback.svg?component'

components/ModelSelector.vue

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
class="text-xs max-w-full"
1111
:disabled="modelList.length === 0"
1212
dropdownClass="text-xs text-black w-52"
13-
containerClass="max-w-full"
13+
:containerClass="classNames('max-w-full', containerClass)"
1414
:dropdownAlign="dropdownAlign"
1515
>
1616
<template #button="{ option }">
@@ -72,8 +72,9 @@
7272
</Selector>
7373
</div>
7474
</template>
75+
7576
<script setup lang="ts">
76-
import { toRefs } from 'vue'
77+
import { computed, onMounted, toRefs, watch } from 'vue'
7778
7879
import IconDelete from '@/assets/icons/delete.svg?component'
7980
import ModelLogo from '@/components/ModelLogo.vue'
@@ -83,13 +84,15 @@ import { formatSize } from '@/utils/formatter'
8384
import { SUPPORTED_MODELS } from '@/utils/llm/web-llm'
8485
import { getTabStore } from '@/utils/tab-store'
8586
import { getUserConfig } from '@/utils/user-config'
87+
import { classNames } from '@/utils/vue/utils'
8688
8789
import Selector from './Selector.vue'
8890
8991
defineProps<{
9092
showDetails?: boolean
9193
allowDelete?: boolean
9294
dropdownAlign?: 'left' | 'center' | 'right' | 'stretch' | undefined
95+
containerClass?: string
9396
}>()
9497
9598
const { modelList: ollamaModelList } = toRefs(useOllamaStatusStore())

components/ProgressBar.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@
66
/>
77
</div>
88
</template>
9+
910
<script setup lang="ts">
11+
import { computed } from 'vue'
12+
1013
const props = defineProps<{
1114
progress: number
1215
}>()

0 commit comments

Comments
 (0)