GithubHelp home page GithubHelp logo

chatgptpowertoys's Introduction

ChatGPT for PowerToys Run

Build

logo

How to install

If you simply want to install the plugin to get up and running quickly, i suggest downloading the precompiled binaries from the Release section. The installation process goes as follows:

  1. Locate your PowerToys installation (eg. C:\Program Files\PowerToys)
  2. Navigate to \RunPlugins
  3. Unpack the downloaded binaries

Compiling the plugin

  1. Clone the PowerToys repository to your local disk using the command git clone https://github.com/microsoft/PowerToys.git
  2. Navigate to the PowerToys directory using cd PowerToys
  3. Initialize and update submodules with the command git submodule update --init --recursive
  4. Fork the ChatGPTPowerToys repository on GitHub
  5. Clone the fork of ChatGPTPowerToys into the local PowerToys repository by running git clone https://github.com/ferraridavide/ChatGPTPowerToys.git in the PowerToys\src\modules\launcher\Plugins directory
  6. In Visual Studio, add the local clone of ChatGPTPowerToys as an existing project to the PowerToys's Plugins folder (modules\launcher\Plugins)
  7. Compile

For PWA support, see #13

chatgptpowertoys's People

Contributors

babico avatar ferraridavide avatar mishalhossin avatar navusas avatar rafared avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

chatgptpowertoys's Issues

Use simple custom chat window with ChatGPT API instead

I know this is a first draft and is as easy as hell, just open the browser, open chatgpt and send that to it, but instead of this, we should make it better. There is already the ChatGPT API so my thoughts on this could be:

  • Use what you already have and hit enter
  • Close PowerToys and open a little dialog instead, like a little chat window, but not the browser, just use the API

This would makes much more sense. Also the next Windows 11 doing similar with adding that into there search. The search turns into a new chat window without opening the browser. What do you think?

GPT never answers question, cursor keeps flashing

Hi Davide,

I love this addon and idea. Thank you. My only issue is that after this addon successfully injects my search term from Power Toys to Chat GPT, GPT never responds. If I create a new conversation and type into GPT without using this addon, GPT replies and works ok. However, when the input has been injected from Tampermonkey, GPT only keeps flashing and never responds to my question even after refreshing the page. I am using Brave as my browser, and this is the only problem I can think of.

Thank you again for taking the time to read this.

Kind regards,
Tomás

image

Precompile a release?

Thanks for making this! It's just what I was looking for.

Would you be willing (and would it be possible) to add a precompiled version to the Releases page, just to make it a little more accessible?

form not submitting

There seems to be a problem with submitting form when prompt is injected, i tried modifing javascript to not click button but submit form instead but no luck.

Doesn't open in ChatGPT PWA.

I hoped this would open in the Edge Browser chatGPT PWA, but sadly, it does not.

"New" chatgpt uses the url https://chatgpt.com but it does not accept query parameters.
The https://chat.openai.com url still takes query parameters and redirects to chatgpt.com.
That is really the trick of this plugin, which is cool.

PWAs can handle their own urls, but I can't find a way to add chat.openai.com as an additional handler. I don't think it's possible. ☹️

image

Support for Bing variant?

As said in title, how hard would it be to have something like this for Bing AI's implementation of ChatGPT?

Fix for the Javascript code in TamperMonkey

Hello and thank you for this wonderful extension. When I tried to use it, it did not work with the current script, so I made three minor changes that made it work.
First, I changed the '// @match https://chat.openai.com/chat?PTquery=*' line because the URL opens without the "/chat/" at the end and the browser extension did not recognize it, as shown here:
image

Second, I added a 500ms wait to the setTimeout Method because without it, the chat would not respond to me and would continue loading, as shown in the image below:
image
as I said the 500ms wait did fix it but I did not try other variants.
The final change I made was to enable the submit button, which was disabled by default until you typed something into the textbox. As a result, the form with the disabled button would not be submitted.
I've included the updated script below; please test it and let me know if it works for you.

// ==UserScript==
// @name         PowerToys Run ChatGPT Helper
// @version      0.1
// @description  https://github.com/ferraridavide/ChatGPTPowerToys
// @author       Davide Ferrari
// @match        https://chat.openai.com/?PTquery=*
// @icon         https://raw.githubusercontent.com/ferraridavide/ChatGPTPowerToys/master/src/PowerToys.ChatGPT.BrowserExtension/icons/icon128.png
// @grant        none
// ==/UserScript==
// ==UserScript==
// @name         PowerToys Run ChatGPT Helper
// @version      0.1
// @description  https://github.com/ferraridavide/ChatGPTPowerToys
// @author       Davide Ferrari
// @match        https://chat.openai.com/?PTquery=*
// @icon         https://raw.githubusercontent.com/ferraridavide/ChatGPTPowerToys/master/src/PowerToys.ChatGPT.BrowserExtension/icons/icon128.png
// @grant        none
// ==/UserScript==
(function() {
    'use strict';
    console.log("PowerToys Run ChatGPT Helper script loaded");

    const searchParams = new URLSearchParams(window.location.search);
    const prompt = searchParams.get("PTquery");
    if (prompt) {
        const textArea = document.querySelector("form textarea");
        const submitButton = document.querySelector("form button");

        if (!textArea || !submitButton) {
            console.error("Cannot find required elements");
        }

        textArea.value = prompt;
        setTimeout(() => {
            textArea.value = prompt;
            submitButton.disabled = false;
            submitButton.click();
        }, 500);
    }
})();

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.