diff --git a/CHANGELOG.md b/CHANGELOG.md index 86e73fd4..97be4ff0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,204 @@ # Changelog +## v1.12.0 + +[compare changes](https://github.com/NativeMindBrowser/NativeMindExtension/compare/v1.12.0-beta.4...v1.12.0) + +## v1.12.0-beta.4 + +[compare changes](https://github.com/NativeMindBrowser/NativeMindExtension/compare/v1.12.0-beta.3...v1.12.0-beta.4) + +### 🩹 Fixes + +- Update welcome message formatting in multiple locale files ([289a966](https://github.com/NativeMindBrowser/NativeMindExtension/commit/289a966)) + +### ❤️ Contributors + +- NekoWings ([@NekoWings](http://github.com/NekoWings)) + +## v1.12.0-beta.3 + +[compare changes](https://github.com/NativeMindBrowser/NativeMindExtension/compare/v1.12.0-beta.2...v1.12.0-beta.3) + +### 💅 Refactors + +- Use current browser lang as extension default lang on first installation ([d2ce4b6](https://github.com/NativeMindBrowser/NativeMindExtension/commit/d2ce4b6)) + +### ❤️ Contributors + +- NekoWings ([@NekoWings](http://github.com/NekoWings)) + +## v1.12.0-beta.2 + +[compare changes](https://github.com/NativeMindBrowser/NativeMindExtension/compare/v1.12.0-beta.1...v1.12.0-beta.2) + +### 🩹 Fixes + +- Add function to check if Firefox sidebar is open ([e10b6c5](https://github.com/NativeMindBrowser/NativeMindExtension/commit/e10b6c5)) + +### ❤️ Contributors + +- NekoWings ([@NekoWings](http://github.com/NekoWings)) + +## v1.12.0-beta.1 + +[compare changes](https://github.com/NativeMindBrowser/NativeMindExtension/compare/v1.12.0-beta.0...v1.12.0-beta.1) + +### 🚀 Enhancements + +- Update welcome message ([acbf3e0](https://github.com/NativeMindBrowser/NativeMindExtension/commit/acbf3e0)) +- Add sidebar modal for Firefox users ([6b9f88e](https://github.com/NativeMindBrowser/NativeMindExtension/commit/6b9f88e)) + +### 🩹 Fixes + +- Update IconClose class in Modal and adjust IconCamera size in PermissionReloadModal ([f0287ca](https://github.com/NativeMindBrowser/NativeMindExtension/commit/f0287ca)) +- Correct permissions assignment for Firefox and other browsers ([8644c7e](https://github.com/NativeMindBrowser/NativeMindExtension/commit/8644c7e)) + +### ❤️ Contributors + +- NekoWings ([@NekoWings](http://github.com/NekoWings)) + +## v1.12.0-beta.0 + +[compare changes](https://github.com/NativeMindBrowser/NativeMindExtension/compare/v1.11.0...v1.12.0-beta.0) + +### 🚀 Enhancements + +- Add permission reload modal for Firefox and update localization strings ([b8eddec](https://github.com/NativeMindBrowser/NativeMindExtension/commit/b8eddec)) + +### 🩹 Fixes + +- Enhance AutoExpandTextArea width handling and add minimum width calculation for Firefox ([0d9e92a](https://github.com/NativeMindBrowser/NativeMindExtension/commit/0d9e92a)) +- Improve capture handling in CameraButton and ensure permission request is processed correctly ([bf8b882](https://github.com/NativeMindBrowser/NativeMindExtension/commit/bf8b882)) + +### ❤️ Contributors + +- NekoWings ([@NekoWings](http://github.com/NekoWings)) + +## v1.11.0 + +[compare changes](https://github.com/NativeMindBrowser/NativeMindExtension/compare/v1.11.0-beta.7...v1.11.0) + +## v1.11.0-beta.7 + +[compare changes](https://github.com/NativeMindBrowser/NativeMindExtension/compare/v1.11.0-beta.6...v1.11.0-beta.7) + +### 🩹 Fixes + +- Add fill attribute to path in dots-vertical icon for color consistency ([277e38a](https://github.com/NativeMindBrowser/NativeMindExtension/commit/277e38a)) +- Improve model user config handling and fix webllm broken issue ([ee19549](https://github.com/NativeMindBrowser/NativeMindExtension/commit/ee19549)) + +### ❤️ Contributors + +- NekoWings ([@NekoWings](http://github.com/NekoWings)) + +## v1.11.0-beta.6 + +[compare changes](https://github.com/NativeMindBrowser/NativeMindExtension/compare/v1.11.0-beta.5...v1.11.0-beta.6) + +### 🚀 Enhancements + +- **writing-tools:** Add button to open writing tools settings ([9b397f9](https://github.com/NativeMindBrowser/NativeMindExtension/commit/9b397f9)) + +### 🩹 Fixes + +- Exclude reasoning parameter for WebLLM model compatibility ([f7c0a93](https://github.com/NativeMindBrowser/NativeMindExtension/commit/f7c0a93)) + +### ❤️ Contributors + +- NekoWings ([@NekoWings](http://github.com/NekoWings)) + +## v1.11.0-beta.5 + +[compare changes](https://github.com/NativeMindBrowser/NativeMindExtension/compare/v1.11.0-beta.4...v1.11.0-beta.5) + +### 🩹 Fixes + +- Improve tooltip boundary detection with container bounds for sidepanel ([03b4115](https://github.com/NativeMindBrowser/NativeMindExtension/commit/03b4115)) +- Exclude welcome and quick action messages from assistant action history ([0803ee2](https://github.com/NativeMindBrowser/NativeMindExtension/commit/0803ee2)) + +### ❤️ Contributors + +- NekoWings ([@NekoWings](http://github.com/NekoWings)) + +## v1.11.0-beta.4 + +[compare changes](https://github.com/NativeMindBrowser/NativeMindExtension/compare/v1.11.0-beta.3...v1.11.0-beta.4) + +### 🩹 Fixes + +- Clean up incomplete agent task groups in history management ([97fcf41](https://github.com/NativeMindBrowser/NativeMindExtension/commit/97fcf41)) + +### ❤️ Contributors + +- NekoWings ([@NekoWings](http://github.com/NekoWings)) + +## v1.11.0-beta.3 + +[compare changes](https://github.com/NativeMindBrowser/NativeMindExtension/compare/v1.11.0-beta.2...v1.11.0-beta.3) + +### 🩹 Fixes + +- Update attachment limit to include captured-page type and improve error handling ([911d45d](https://github.com/NativeMindBrowser/NativeMindExtension/commit/911d45d)) + +### ❤️ Contributors + +- NekoWings ([@NekoWings](http://github.com/NekoWings)) + +## v1.11.0-beta.2 + +[compare changes](https://github.com/NativeMindBrowser/NativeMindExtension/compare/v1.11.0-beta.1...v1.11.0-beta.2) + +### 🩹 Fixes + +- Enhance tab capture functionality with cached window ID and optional host permissions ([32d389d](https://github.com/NativeMindBrowser/NativeMindExtension/commit/32d389d)) + +### ❤️ Contributors + +- NekoWings ([@NekoWings](http://github.com/NekoWings)) + +## v1.11.0-beta.1 + +[compare changes](https://github.com/NativeMindBrowser/NativeMindExtension/compare/v1.11.0-beta.0...v1.11.0-beta.1) + +### 🚀 Enhancements + +- Add copy and retry actions for AI messages component. ([eec015b](https://github.com/NativeMindBrowser/NativeMindExtension/commit/eec015b)) + +### 🩹 Fixes + +- **chat:** Add cleanup method for loading attachments in ReactiveHistoryManager ([befb170](https://github.com/NativeMindBrowser/NativeMindExtension/commit/befb170)) + +### ❤️ Contributors + +- NekoWings ([@NekoWings](http://github.com/NekoWings)) + +## v1.11.0-beta.0 + +[compare changes](https://github.com/NativeMindBrowser/NativeMindExtension/compare/v1.10.1...v1.11.0-beta.0) + +### 🚀 Enhancements + +- **chat:** Implement message editing and copying functionality in User component ([5ed4d64](https://github.com/NativeMindBrowser/NativeMindExtension/commit/5ed4d64)) +- **chat:** Enhance message editing UI with scroll container and improved button functionality ([88ed48d](https://github.com/NativeMindBrowser/NativeMindExtension/commit/88ed48d)) +- **selection:** Implement selection text tracking and integrate with llm ([ccdf982](https://github.com/NativeMindBrowser/NativeMindExtension/commit/ccdf982)) +- Add camera functionality and support for captured pages ([2c551a3](https://github.com/NativeMindBrowser/NativeMindExtension/commit/2c551a3)) +- Introduce effort selection for gpt-oss in chat ([11d3e19](https://github.com/NativeMindBrowser/NativeMindExtension/commit/11d3e19)) + +### 🩹 Fixes + +- **web-llm:** Fix infinite loading when local model cache is invalid ([66239b1](https://github.com/NativeMindBrowser/NativeMindExtension/commit/66239b1)) + +### 🏡 Chore + +- **release:** V1.9.5 ([c7afaef](https://github.com/NativeMindBrowser/NativeMindExtension/commit/c7afaef)) + +### ❤️ Contributors + +- NekoWings ([@NekoWings](http://github.com/NekoWings)) +- Neko Liu ([@NekoWings](http://github.com/NekoWings)) +- Tony Hu ([@tonyhu-012](http://github.com/tonyhu-012)) + ## v1.10.1 [compare changes](https://github.com/NativeMindBrowser/NativeMindExtension/compare/v1.10.1-beta.2...v1.10.1) diff --git a/assets/icons/camera.svg b/assets/icons/camera.svg new file mode 100644 index 00000000..bc3976ed --- /dev/null +++ b/assets/icons/camera.svg @@ -0,0 +1,8 @@ + + + + \ No newline at end of file diff --git a/assets/icons/captured-page.svg b/assets/icons/captured-page.svg new file mode 100644 index 00000000..47bf0f8c --- /dev/null +++ b/assets/icons/captured-page.svg @@ -0,0 +1,16 @@ + + + + + + + \ No newline at end of file diff --git a/assets/icons/copy.svg b/assets/icons/copy.svg index 7577d583..0c5f0218 100644 --- a/assets/icons/copy.svg +++ b/assets/icons/copy.svg @@ -1,5 +1,8 @@ + d="M4.6665 6.44597C4.6665 5.97441 4.85383 5.52217 5.18727 5.18873C5.52071 4.85529 5.97295 4.66797 6.4445 4.66797H12.2218C12.4553 4.66797 12.6865 4.71396 12.9022 4.80331C13.118 4.89266 13.314 5.02363 13.4791 5.18873C13.6442 5.35384 13.7751 5.54984 13.8645 5.76556C13.9538 5.98127 13.9998 6.21248 13.9998 6.44597V12.2233C13.9998 12.4568 13.9538 12.688 13.8645 12.9037C13.7751 13.1194 13.6442 13.3154 13.4791 13.4805C13.314 13.6456 13.118 13.7766 12.9022 13.866C12.6865 13.9553 12.4553 14.0013 12.2218 14.0013H6.4445C6.21101 14.0013 5.97981 13.9553 5.76409 13.866C5.54838 13.7766 5.35237 13.6456 5.18727 13.4805C5.02217 13.3154 4.8912 13.1194 4.80185 12.9037C4.71249 12.688 4.6665 12.4568 4.6665 12.2233V6.44597Z" + stroke="currentColor" stroke-width="1.33333" stroke-linecap="round" stroke-linejoin="round" /> + \ No newline at end of file diff --git a/assets/icons/dots-vertical.svg b/assets/icons/dots-vertical.svg index 9efe31fb..5ed70c88 100644 --- a/assets/icons/dots-vertical.svg +++ b/assets/icons/dots-vertical.svg @@ -1,3 +1,4 @@ - + \ No newline at end of file diff --git a/assets/icons/retry.svg b/assets/icons/retry.svg new file mode 100644 index 00000000..0d7f19cf --- /dev/null +++ b/assets/icons/retry.svg @@ -0,0 +1,8 @@ + + + + \ No newline at end of file diff --git a/assets/icons/selected-text.svg b/assets/icons/selected-text.svg new file mode 100644 index 00000000..96fd057d --- /dev/null +++ b/assets/icons/selected-text.svg @@ -0,0 +1,13 @@ + + + + + + + \ No newline at end of file diff --git a/components/AutoExpandTextArea.vue b/components/AutoExpandTextArea.vue index 894459cc..c33941a0 100644 --- a/components/AutoExpandTextArea.vue +++ b/components/AutoExpandTextArea.vue @@ -45,29 +45,54 @@ if (!CSS.supports('field-sizing', 'content')) { const textareaBounding = useElementBounding(textareaRef) const getSizingStyles = () => { const width = textareaRef.value?.offsetWidth - const baseStyleCss = `position: absolute; top: 100px; left: 100px; opacity: 1; max-height: 0; overflow-wrap: anywhere; width: ${width}px; scrollbar-width: none` + const widthRule = typeof width === 'number' && width > 0 ? `width: ${width}px;` : '' + const baseStyleCss = `position: absolute; top: 100px; left: 100px; opacity: 1; max-height: 0; overflow-wrap: anywhere; scrollbar-width: none; ${widthRule}` if (!textareaRef.value) return baseStyleCss const el = textareaRef.value const styles = window.getComputedStyle(el) const sizingStyles = ['width', 'padding-left', 'padding-right', 'border-left', 'border-right', 'box-sizing', 'font-family', 'font-size'] - return sizingStyles.filter((prop) => !!styles.getPropertyValue(prop)).map((prop) => `${prop}: ${styles.getPropertyValue(prop)}`).join('; ') + ';' + baseStyleCss + return sizingStyles + .filter((prop) => !!styles.getPropertyValue(prop)) + .map((prop) => `${prop}: ${styles.getPropertyValue(prop)}`) + .join('; ') + ';' + baseStyleCss } const { element: measureEl } = useTempElement('textarea', { attributes: { style: getSizingStyles(), id: `nm-textarea-measure-${generateRandomId()}` } }) - watch(() => [textareaBounding.width.value], ([width]) => { + const syncMeasureStyles = (width?: number) => { measureEl.style.cssText = getSizingStyles() - measureEl.style.width = `${width}px` - }) + if (typeof width === 'number' && width > 0) { + measureEl.style.width = `${width}px` + } + } - watch(inputValue, async (v) => { - measureEl.value = v ?? '' - if (!textareaRef.value) return + const resizeTextarea = () => { const textarea = textareaRef.value + if (!textarea) return + const width = textareaBounding.width.value + if (width <= 0) return + syncMeasureStyles(width) + measureEl.value = inputValue.value ?? '' // force a reflow to ensure the height is recalculated const _ = measureEl.offsetHeight const scrollHeight = measureEl.scrollHeight const height = Math.max(props.minHeight || 0, scrollHeight) - textarea.style.height = `${height}px` // Set height to scrollHeight to expand - }) + textarea.style.height = `${height}px` + } + + watch( + () => textareaBounding.width.value, + () => { + resizeTextarea() + }, + { immediate: true, flush: 'post' }, + ) + + watch( + inputValue, + () => { + resizeTextarea() + }, + { immediate: true, flush: 'post' }, + ) } diff --git a/components/Modal.vue b/components/Modal.vue index cb339188..fbdeac48 100644 --- a/components/Modal.vue +++ b/components/Modal.vue @@ -45,7 +45,7 @@ diff --git a/components/Selector.vue b/components/Selector.vue index 9aea8a5b..1047f3e4 100644 --- a/components/Selector.vue +++ b/components/Selector.vue @@ -1,6 +1,6 @@