extensions: github copilot (noi-ask)

This commit is contained in:
lencx
2025-02-05 18:31:16 +08:00
parent 14f27e40dd
commit 226b36bbe3
7 changed files with 43 additions and 7 deletions

View File

@@ -18,6 +18,8 @@
Introducing Noi: an AI-enhanced, customizable browser designed to streamline your digital experience:
**AI Support: [ChatGPT](https://chatgpt.com), [Claude](https://claude.ai), [Gemini](https://gemini.google.com), [DeepSeek](https://chat.deepseek.com), [GitHub Copilot](https://github.com/copilot), [HuggingChat](https://huggingface.co/chat), ..., etc.**
- **Browser**: Noi not only includes curated AI websites but also allows the addition of any URL, providing a tailored browsing experience ([Noi Configs](./configs)).
- **Prompts Management**: Offers robust customization options including the addition, synchronization, batch tagging, and removal of prompts.
- **Noi Ask**: Enables sending batch messages to multiple AI chats, streamlining the process of interacting with various AI services simultaneously ([Noi Extensions](./extensions)). Entries made via Noi Ask are stored locally, ensuring easy access for future review or bookmarking.
@@ -108,7 +110,7 @@ Learn more: [electronjs/doc](https://www.electronjs.org/docs/latest/api/extensio
<!-- EXTENSIONS_START -->
| Name | Version | Description |
| --- | --- | --- |
| [@noi/ask](https://github.com/lencx/Noi/tree/main/extensions/noi-ask) | 0.1.15 | The best assistant for batch asking and quick typing of prompts. |
| [@noi/ask](https://github.com/lencx/Noi/tree/main/extensions/noi-ask) | 0.1.16 | 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/export-chatgpt](https://github.com/lencx/Noi/tree/main/extensions/noi-export-chatgpt) | 0.1.1 | ChatGPT chat history export, supports PDF, Image, and Markdown formats. |
| [@noi/reset](https://github.com/lencx/Noi/tree/main/extensions/noi-reset) | 0.1.3 | Reset certain website styles to enhance compatibility with Noi. |

View File

@@ -1,6 +1,6 @@
{
"name": "Noi Mode",
"version": "0.1.9",
"version": "0.1.10",
"sync": "https://github.com/lencx/noi/blob/main/configs/noi.mode.cn.json",
"modes": [
{
@@ -57,6 +57,12 @@
"text": "DeepSeek",
"url": "https://chat.deepseek.com"
},
{
"id": "noi:githubcopilot",
"parent": "noi@ai",
"text": "GitHub Copilot",
"url": "https://github.com/copilot"
},
{
"id": "noi:sora",
"parent": "noi@ai",

View File

@@ -1,6 +1,6 @@
{
"name": "Noi Mode",
"version": "0.1.12",
"version": "0.1.13",
"sync": "https://github.com/lencx/noi/blob/main/configs/noi.mode.json",
"modes": [
{
@@ -63,6 +63,12 @@
"text": "DeepSeek",
"url": "https://chat.deepseek.com"
},
{
"id": "noi:githubcopilot",
"parent": "noi@ai",
"text": "GitHub Copilot",
"url": "https://github.com/copilot"
},
{
"id": "noi:sora",
"parent": "noi@ai",

View File

@@ -9,7 +9,7 @@ Learn more: [electronjs/doc](https://www.electronjs.org/docs/latest/api/extensio
<!-- EXTENSIONS_START -->
| Name | Version | Description |
| --- | --- | --- |
| [@noi/ask](https://github.com/lencx/Noi/tree/main/extensions/noi-ask) | 0.1.15 | The best assistant for batch asking and quick typing of prompts. |
| [@noi/ask](https://github.com/lencx/Noi/tree/main/extensions/noi-ask) | 0.1.16 | 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/export-chatgpt](https://github.com/lencx/Noi/tree/main/extensions/noi-export-chatgpt) | 0.1.1 | ChatGPT chat history export, supports PDF, Image, and Markdown formats. |
| [@noi/reset](https://github.com/lencx/Noi/tree/main/extensions/noi-reset) | 0.1.3 | Reset certain website styles to enhance compatibility with Noi. |

View File

@@ -401,6 +401,26 @@ class JimengAsk extends NoiAsk {
}
}
class GitHubCopilotAsk extends NoiAsk {
static name = 'GitHub';
static url = 'https://github.com/copilot';
static sync(message) {
const inputElement = document.querySelector('form #copilot-chat-textarea');
if (inputElement) {
inputElement.focus();
document.execCommand('undo');
document.execCommand('insertText', false, message);
}
}
static submit() {
const btns = document.querySelectorAll('form button');
const btn = btns[btns.length - 1];
if (btn) this.autoClick(btn);
}
}
window.NoiAsk = {
OpenAIAsk,
SoraAsk,
@@ -422,4 +442,5 @@ window.NoiAsk = {
NotebooklmAsk,
JimengAsk,
DeepSeekAsk,
GitHubCopilotAsk,
};

View File

@@ -1,7 +1,7 @@
{
"manifest_version": 3,
"name": "@noi/ask",
"version": "0.1.15",
"version": "0.1.16",
"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": [
@@ -26,7 +26,8 @@
"https://suno.com/*",
"https://notebooklm.google.com/*",
"https://jimeng.jianying.com/*",
"https://chat.deepseek.com/*"
"https://chat.deepseek.com/*",
"https://github.com/copilot/*"
],
"js": ["main.js"],
"run_at": "document_end",

View File

@@ -5,7 +5,7 @@
{
"name": "@noi/ask",
"description": "The best assistant for batch asking and quick typing of prompts.",
"version": "0.1.15",
"version": "0.1.16",
"url": "https://github.com/lencx/Noi/tree/main/extensions/noi-ask",
"dirname": "noi-ask",
"disabled": false