Hacker News new | ask | show | jobs
by ghughes 1099 days ago
Cool project! I'm working in the same space (a ChatGPT plugin that can edit files within a shared VS Code workspace) and have built something similar to your "repo map" concept, except slightly lower-level: what you might call a "file map" generated by selectively collapsing AST nodes to fit within the available token budget. If ctags isn't cutting it for you, have a look at tree-sitter [1]. It can generate ASTs for most languages and has a nice API.

[1] https://tree-sitter.github.io/tree-sitter/

1 comments

Glad to hear there are others working on similar things. I've been wishing there was a good forum for like minded folks to share ideas about AI coding, beyond the random drive-by commenting that happens here on HN.

I have been looking at tree-sitter quite a bit actually. I love that it has broad language support, which is a key design goal for my tool.

My only hesitation is that it doesn't appear to correctly identify multi-line function signatures & calls. If you look below at create, io.tool_error and __init__ you can see that the (row,col)-(row,col) indicies only reference the first line.

GPT would really benefit from seeing the entire function signature and call sites.

  $ tree-sitter tags aider/coders/base_coder.py
  ...
  create      | function def (39, 8) - (39, 14) `def create(`
  check_model_availability  | call     ref (54, 19) - (54, 43) `if not check_model_availability(main_model):`
  tool_error  | call     ref (56, 23) - (56, 33) `io.tool_error(`
  EditBlockCoder  | call     ref (66, 19) - (66, 33) `return EditBlockCoder(main_model, io, **kwargs)`
  ...
  __init__    | function def (74, 8) - (74, 16) `def __init__(`
  set         | call     ref (89, 26) - (89, 29) `self.abs_fnames = set()`
  ...
Hi, I like discussing these topics too. I just created this for this purpose if you want to join me here https://discord.gg/r3vK4xY4

There's also an existing larger "gpt hackers" Discord you might be interested in checking out that I'm not involved with: https://discord.gg/pMjHMvkK

I'd also like to join. Care to open up the invitation link again?
I too would be interested in a good forum for like minded folks to share ideas about AI coding!
Hi, I like discussing these topics too. I just created this for this purpose if you want to join me here https://discord.gg/r3vK4xY4

There's also an existing larger "gpt hackers" Discord you might be interested in checking out that I'm not involved with: https://discord.gg/pMjHMvkK

Thank you
Same. I don't know if it'd be Lemmy or something else just hosted somewhere, and there might just be 5 of us - if people are interested I can make something today. Strong preferences on platforms? If not I'll make something.
I setup https://aicoding.club/ a lemmy instance for this.
It is not loading for me :(
Aha, that would be because I got the url wrong that I just set up. https://aicoding.club/ (and fixed in the message before).

If you get a fasthosts landing page, it's DNS propogation issues. Should be hooked up to 68.183.253.254 (correct on google and cloudflare dns).

Thank you
Likewise interested and exploring the same area.
I’d be very interested in joining this group
Add me too please. Good initiative.
I'm also interested
Count me in as well.
And me!
Interested. I currently use GPT to write the majority of my commit messages and catch bugs at commit time.