-
Notifications
You must be signed in to change notification settings - Fork 390
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
win11 noi0.4.0 noi ask模式,gpt-4o 无法同步发送prompt #178
Comments
我也有同样的问题,很急切地期望能新版本或者有别的方法临时解决 @lencx |
lencx给了答复:
|
I am a beginner with JavaScript and this application, but I was able to resolve the issue by overriding
我是一个JavaScript和这个应用程序的初学者,但我通过覆盖main.js解决了这个问题。 它可以与多个AI一起使用。 class OpenAIAsk extends NoiAsk {
static name = 'ChatGPT';
static url = 'https://chatgpt.com';
static sync(message) {
const inputElement = document.querySelector('textarea#prompt-textarea');
if (inputElement) {
const nativeTextareaSetter = Object.getOwnPropertyDescriptor(window.HTMLTextAreaElement.prototype, 'value').set;
nativeTextareaSetter.call(inputElement, message);
const inputEvent = new InputEvent('input', {
bubbles: true,
cancelable: true,
});
inputElement.dispatchEvent(inputEvent);
}
}
static autoFocus() {
const inputElement = document.querySelector('textarea#prompt-textarea');
if (inputElement) {
inputElement.focus();
}
}
static submit() {
const btn = document.querySelector('button[data-testid="fruitjuice-send-button"]');
if (btn) this.autoClick(btn);
}
} |
解决了非常感谢 |
Thanks to @hayashitomoharu and @neo-ai-zh for the guidance. For my solution, it was simply about changing the URL in the sidebar, manifest.json, and main.js (no actual code changes required).
My OpenAIAsk class still looks like this:
|
You're on the right path, here's my quick-workaround (without using the custom ask mode).
|
win11 noi0.4.0 noi ask模式,gpt-4o 无法同步发送prompt
![20240528-211857](https://private-user-images.githubusercontent.com/156068829/334427608-a6b05eb8-32e6-44f9-92ba-313f3549113d.jpg?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk4MjM2NTAsIm5iZiI6MTcxOTgyMzM1MCwicGF0aCI6Ii8xNTYwNjg4MjkvMzM0NDI3NjA4LWE2YjA1ZWI4LTMyZTYtNDRmOS05MmJhLTMxM2YzNTQ5MTEzZC5qcGc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNzAxJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDcwMVQwODQyMzBaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0yMTZmNzFjZGZlOGMyMjdlZGE0OGJkOTJhNDViZTJlNzJkNGQ3Yjc4OGJhNjM3NGI4ZDI0ZGJjNDg3MTVhZDczJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.wruaj994IAyxnvPF3n8bLZLL3NXBv9-GuzYXG6T6bUU)
The text was updated successfully, but these errors were encountered: