4 ms·
As shared by Simon in https://news.ycombinator.com/item?id=44176523 https://news.ycombinator.com/item?id=44176523, a better agent will prepend the line numbers
by throwdbaaway 1y ago
As shared by Simon in https://news.ycombinator.com/item?id=44176523 https://news.ycombinator.com/item?id=44176523, a better agent will prepend the line numbers as a workaround, e.g. Claude Code:
54 def dicts_to_table_string(
55 headings: List[str], dicts: List[Dict[str, str]]
56 ) -> List[str]:
57 max_lengths = [len(h) for h in headings]
58
59 # Compute maximum length for each column
60 for d in dicts:
- emp17344 1y agoThat’s not what he’s saying there. There’s a separate tool that adds line numbers before feeding the prompt into the LLM. It’s not the LLM doing it itself.
- throwdbaaway 1y agoI just learnt the `nl -ba` trick from Codex. Claude Code is most likely doing the same.