News for hackers. Stuff that matters.
Re:OpenAI's o1-pro now available via API by hooloovoo_zoo on Wednesday March 19, 2025 @07:08PM (#43418190)
Is your prompt {$codebase} find bugs?
Re:OpenAI's o1-pro now available via API by davidbarker on Wednesday March 19, 2025 @07:12PM (#43418215)
Typically something like:

  Look carefully through my codebase and identify any bugs/issues, or refactors that could improve it.

  <codebase>
  …
  </codebase>
Doesn't have to be anything overly complicated to get good results. It also does well if you give it a git diff.
Re:OpenAI's o1-pro now available via API by ionwake on Wednesday March 19, 2025 @07:46PM (#43418471)
Sorry if this is a noob question, but are you just pasting file strings inbetween those tags? like the contents of file1.js and file2.js?
Re:OpenAI's o1-pro now available via API by diggan on Wednesday March 19, 2025 @07:58PM (#43418553)
I do something similar, but "raw" markdown instead + filename, so all my prompts end up like this basically:

    Do blah blah blah while taking blah and blah into account. Here is my current code:

    File `file1.js`:

    ```javascript
    console.log('I am number one!')
    ```

    File `file2.js`:

    ```javascript
    console.log("I am number two :(")
    ```
Not sure if I'm imagining, but when I tried with/without the markdown code blocks, it seems to do better when I used markdown code blocks, so wrote a quick CLI that takes a directory path + prompt and creates something like that automatically for me. Often times I send identical prompts to ChatGPT+DeepThink+Claude, compare the approaches and continue with the one that works best for that particular problem, so having something reusable really saved time for this.

Edit: fuck it, in case people are curious how my little CLI works, I threw it up here: https://github.com/victorb/prompta (beware of bugs and whatnot, I've quite literally hacked this together without much thought)

Re:OpenAI's o1-pro now available via API by atxtechbro on Wednesday March 19, 2025 @08:18PM (#43418678)
I actually have a perfect tool called siphon-cli for this. It adds the headers in between files and everything. https://docs.siphon-cli.com/
Re:OpenAI's o1-pro now available via API by diggan on Wednesday March 19, 2025 @08:21PM (#43418701)
Yeah, like a lightweight version of my prompta CLI :)

What I end up with, is one .md file that uses variables like "$SRC", "$TESTS" and "$DOCS" inside of it, that gets replaced when you run `prompta output`, and then there is also a JSON file that defines what those variables actually get replaced with.

Bit off-topic, but curious how your repository ends up having 8023 lines of something for concatenating files, while my own CLI sits on 687 lines (500 of those are Rust) but has a lot more functionality :)

Re:OpenAI's o1-pro now available via API by quartzic on Wednesday March 19, 2025 @09:51PM (#43419210)
Not OP, but practically all of those lines are from a package-lock.json file (6755 lines) and a changelog (541 lines). It looks like the actual source is 179 lines long.
Re:OpenAI's o1-pro now available via API by pridkett on Wednesday March 19, 2025 @07:54PM (#43418530)
Repomix can take care of this for you. I pack it, cat the file to my clipboard with pbcopy, and just paste it into the prompt.

https://github.com/yamadashy/repomix

Re:OpenAI's o1-pro now available via API by diggan on Wednesday March 19, 2025 @08:00PM (#43418570)
I tried the web demo (https://repomix.com/) and it seems to generate unnecessarily complex "packs" for no reason, probably hurts LLM performance too. Why is there "Usage Guidelines" and "File Format" explanations in this, when it's supposed to just be the code "packed"? Better to just have the contents+filename, it'll infer that its directory structure and everything else.
Re:OpenAI's o1-pro now available via API by jakereps on Wednesday March 19, 2025 @08:27PM (#43418736)
While possibly being strange defaults, both of those are options. Remove the file summary and directory structure, both featured on the UI, and on the CLI tool, and voila, it's in your "better" state. There are also additional compression options beyond those two tweaks.
Re:OpenAI's o1-pro now available via API by keizo on Wednesday March 19, 2025 @08:29PM (#43418744)
I wrote a script to do exactly this a while ago (with the help of o1 pro). Makes it way easier https://github.com/keizo/ggrab
Re:OpenAI's o1-pro now available via API by davidbarker on Wednesday March 19, 2025 @08:30PM (#43418751)
That's right. I made a VS Code extension to combine all the files I have open into one long string I can copy & paste.

https://marketplace.visualstudio.com/items?itemName=DVYIO.co...

Re:OpenAI's o1-pro now available via API by crossroadsguy on Thursday March 20, 2025 @02:37AM (#43420316)
Do you get this -

When you say: But is that really a bug?

GPT: That's right. Now that I see it again this is not a bug….and a lot of blah blah.