Live data from Hacker News

Show HN: No more copy-pasting – a ChatGPT plugin to read code from your computer

github.com

21–28 of 28 posts

Re: Show HN: No more copy-pasting – a ChatGPT plugin to read code from your computer

#21

I’d love to be able to use something like this for my Python codebase, think you’ll ever expand to other languages?

Perhaps, this project is one day old. So in the future everything is possible. Right now, it already allows reading the content of any type of file. So you can definitely use it on a Python project.

The feature that can read specific functions/methods out from files only works for TypeScript (at the moment).

Re: Show HN: No more copy-pasting – a ChatGPT plugin to read code from your computer

#22

Super interesting project! I like that you're exposing the structure of the git repo to GPT, and helping it understand and access the code in a semantically meaningful way via the function definition APIs. I've been working on similar things with GPT, but in a language agnostic way. That makes things a bit trickier, having to parse arbitrary source code languages. I was curious how you were parsing/lexing the files t…

I am not entirely sure how ChatGPT plugins work in terms of context. When it loads the various files in my project, sometimes a dozen files at a couple kilobyte each, it then tells me everything there is to know about them.

That would have been impossible with just pasting the file contents into a single user interaction in chat, because of token limits. But with the plugin, it seems to work (mostly). It still meets token limits for very large files, or if it starts recursing into querying functions in each file - which is why I often tell it to only read the full files themselves.

Re: Show HN: No more copy-pasting – a ChatGPT plugin to read code from your computer

#23
IMPORTANT: A fascinating approach to better improve on a project-wide basis instead of a small-scope basis.

1. Prompt: "Read project code files. Describe the flow of ? Just a step by step description of each operation taking place that this software is doing. Be as detailed as you possibly can."

2. Prompt: "Suggest improvements to this process described above, how , how taken into account, and add any additional edge cases that you can think of to make the process more robust and to cause it in a more complete way.

3. *WRITE THE TWO ABOVE ANSWERS INTO A FILE CALLED GAME_PLAN.md*

4. Prompt: "Read the file called GAME_PLAN.md and write code that implements the first improvement."

5. Profit!

Re: Show HN: No more copy-pasting – a ChatGPT plugin to read code from your computer

#25

"a new era", really? ChatGPT can be quite corny in default mode. I recommend experimenting with prompts to make it sound more natural, and not using its responses verbatim in your communications. Cool project though.

This plugin allows ChatGPT to pull files (on its own) from your local software project. How can you enable that with prompts exactly? Other than spending hours copy-pasting, which is what this project solves.

Re: Show HN: No more copy-pasting – a ChatGPT plugin to read code from your computer

#26
post #25

"a new era", really? ChatGPT can be quite corny in default mode. I recommend experimenting with prompts to make it sound more natural, and not using its responses verbatim in your communications. Cool project though.

This plugin allows ChatGPT to pull files (on its own) from your local software project. How can you enable that with prompts exactly? Other than spending hours copy-pasting, which is what this project solves.

You completely missed the joke lol.

Re: Show HN: No more copy-pasting – a ChatGPT plugin to read code from your computer

#27
post #25

Earlier quoted context omitted.

This plugin allows ChatGPT to pull files (on its own) from your local software project. How can you enable that with prompts exactly? Other than spending hours copy-pasting, which is what this project solves.

You completely missed the joke lol.

doh

Re: Show HN: No more copy-pasting – a ChatGPT plugin to read code from your computer

#28
post #9

I'd like to know how these kinds of tools (Copilot included) avoid reading users' secret tokens and passwords. But knowing how we programmers work and how we treat security collectively, I guess I've already had the answer.

Not put them in plain-text :shrug:

I wrote a small utility to do this (https://www.npmjs.com/package/@qnzl/lockbox) and it behaves similar to `pass` by using gpg encryption. I wrote it because I was doing a lot of programming streaming and I kept exposing secrets.

So rather than having a .profile that is:

GITHUB_TOKEN="steal this"

It's

GITHUB_TOKEN=$(lockbox product/dev/githubToken)

Then you `source` it and your secrets are in your environment without putting them into plain-text.

Post reply on HN