From 40ae76d3c18efee7c4329eea666dc029192a7cdd Mon Sep 17 00:00:00 2001 From: lencx Date: Sun, 16 Mar 2025 13:32:19 +0800 Subject: [PATCH] extensions: qwen, yuanbao (noi-ask) --- README.md | 2 +- configs/noi.mode.cn.json | 14 ++++++++++++- configs/noi.mode.json | 8 +++++++- extensions/README.md | 2 +- extensions/noi-ask/main.js | 34 ++++++++++++++++++++++++++++++-- extensions/noi-ask/manifest.json | 6 ++++-- extensions/noi.extensions.json | 2 +- 7 files changed, 59 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index fbb57b7..ee9fff9 100644 --- a/README.md +++ b/README.md @@ -110,7 +110,7 @@ Learn more: [electronjs/doc](https://www.electronjs.org/docs/latest/api/extensio | Name | Version | Description | | --- | --- | --- | -| [@noi/ask](https://github.com/lencx/Noi/tree/main/extensions/noi-ask) | 0.1.19 | The best assistant for batch asking and quick typing of prompts. | +| [@noi/ask](https://github.com/lencx/Noi/tree/main/extensions/noi-ask) | 0.2.0 | The best assistant for batch asking and quick typing of prompts. | | [@noi/ask-custom](https://github.com/lencx/Noi/tree/main/extensions/noi-ask-custom) | 0.1.0 | The best assistant for batch asking and quick typing of prompts. | | [@noi/reset](https://github.com/lencx/Noi/tree/main/extensions/noi-reset) | 0.1.3 | Reset certain website styles to enhance compatibility with Noi. | diff --git a/configs/noi.mode.cn.json b/configs/noi.mode.cn.json index 5849549..e48de36 100644 --- a/configs/noi.mode.cn.json +++ b/configs/noi.mode.cn.json @@ -1,6 +1,6 @@ { "name": "Noi Mode", - "version": "0.1.11", + "version": "0.2.0", "sync": "https://github.com/lencx/noi/blob/main/configs/noi.mode.cn.json", "modes": [ { @@ -51,6 +51,12 @@ "text": "Gemini", "url": "https://gemini.google.com" }, + { + "id": "noi:qwen", + "parent": "noi@ai", + "text": "Qwen", + "url": "https://chat.qwen.ai" + }, { "id": "noi:grok", "parent": "noi@ai", @@ -159,6 +165,12 @@ "text": "豆包", "url": "https://www.doubao.com" }, + { + "id": "noi:yuanbao", + "parent": "noi@aiCN", + "text": "腾讯元宝", + "url": "https://yuanbao.tencent.com/chat" + }, { "id": "noi:jimeng", "parent": "noi@aiCN", diff --git a/configs/noi.mode.json b/configs/noi.mode.json index 66b0a0b..6be374f 100644 --- a/configs/noi.mode.json +++ b/configs/noi.mode.json @@ -1,6 +1,6 @@ { "name": "Noi Mode", - "version": "0.1.14", + "version": "0.2.0", "sync": "https://github.com/lencx/noi/blob/main/configs/noi.mode.json", "modes": [ { @@ -105,6 +105,12 @@ "text": "HuggingChat", "url": "https://huggingface.co/chat" }, + { + "id": "noi:qwen", + "parent": "noi@ai", + "text": "Qwen", + "url": "https://chat.qwen.ai" + }, { "id": "noi:groq", "parent": "noi@ai", diff --git a/extensions/README.md b/extensions/README.md index 5d53b27..bef7870 100644 --- a/extensions/README.md +++ b/extensions/README.md @@ -9,7 +9,7 @@ Learn more: [electronjs/doc](https://www.electronjs.org/docs/latest/api/extensio | Name | Version | Description | | --- | --- | --- | -| [@noi/ask](https://github.com/lencx/Noi/tree/main/extensions/noi-ask) | 0.1.19 | The best assistant for batch asking and quick typing of prompts. | +| [@noi/ask](https://github.com/lencx/Noi/tree/main/extensions/noi-ask) | 0.2.0 | The best assistant for batch asking and quick typing of prompts. | | [@noi/ask-custom](https://github.com/lencx/Noi/tree/main/extensions/noi-ask-custom) | 0.1.0 | The best assistant for batch asking and quick typing of prompts. | | [@noi/reset](https://github.com/lencx/Noi/tree/main/extensions/noi-reset) | 0.1.3 | Reset certain website styles to enhance compatibility with Noi. | \ No newline at end of file diff --git a/extensions/noi-ask/main.js b/extensions/noi-ask/main.js index f8b92da..8103a8f 100644 --- a/extensions/noi-ask/main.js +++ b/extensions/noi-ask/main.js @@ -381,7 +381,7 @@ class DeepSeekAsk extends NoiAsk { } class TongyiAsk extends NoiAsk { - static name = 'TongYi'; // 通义千问 + static name = 'QianWen'; // 通义千问 static url = 'https://tongyi.aliyun.com/qianwen'; static submit() { @@ -390,8 +390,18 @@ class TongyiAsk extends NoiAsk { } } +class QwenAsk extends NoiAsk { + static name = 'Qwen'; // 千问 + static url = 'https://chat.qwen.ai'; + + static submit() { + const btn = document.querySelector('button#send-message-button'); + if (btn) btn.click(); + } +} + class JimengAsk extends NoiAsk { - static name = 'Jimeng'; + static name = 'Jimeng'; // 即梦 static url = 'https://jimeng.jianying.com'; static sync(message) { @@ -429,6 +439,24 @@ class MetasoAsk extends NoiAsk { } } +class YuanbaoAsk extends NoiAsk { + static name = 'YuanBao'; // 腾讯元宝 + static url = 'https://yuanbao.tencent.com/chat'; + + static sync(message) { + const inputElement = document.querySelector('[contenteditable=true]'); + if (inputElement) { + inputElement.focus(); + inputElement.innerHTML = message; + } + } + + static submit() { + const btn = document.querySelector('.icon-send'); + if (btn) btn.click(); + } +} + window.NoiAsk = { OpenAIAsk, ClaudeAsk, @@ -451,7 +479,9 @@ window.NoiAsk = { DoubaoAsk, ChatGLMAsk, TongyiAsk, + QwenAsk, JimengAsk, DeepSeekAsk, MetasoAsk, + YuanbaoAsk, }; diff --git a/extensions/noi-ask/manifest.json b/extensions/noi-ask/manifest.json index 2ed8e99..a0ec369 100644 --- a/extensions/noi-ask/manifest.json +++ b/extensions/noi-ask/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 3, "name": "@noi/ask", - "version": "0.1.19", + "version": "0.2.0", "homepage": "https://github.com/lencx/Noi/tree/main/extensions/noi-ask", "description": "The best assistant for batch asking and quick typing of prompts.", "content_scripts": [ @@ -28,9 +28,11 @@ "https://chatglm.cn/*", "https://www.doubao.com/*", "https://tongyi.aliyun.com/qianwen/*", + "https://chat.qwen.ai/*", "https://jimeng.jianying.com/*", "https://chat.deepseek.com/*", - "https://metaso.cn/*" + "https://metaso.cn/*", + "https://yuanbao.tencent.com/*" ], "js": ["main.js"], "run_at": "document_end", diff --git a/extensions/noi.extensions.json b/extensions/noi.extensions.json index dabd2d5..3544978 100644 --- a/extensions/noi.extensions.json +++ b/extensions/noi.extensions.json @@ -5,7 +5,7 @@ { "name": "@noi/ask", "description": "The best assistant for batch asking and quick typing of prompts.", - "version": "0.1.19", + "version": "0.2.0", "url": "https://github.com/lencx/Noi/tree/main/extensions/noi-ask", "dirname": "noi-ask", "disabled": false