-
-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: repo-query support #15
Conversation
solved doubt (ignore)This is mostly done (except reviews), but there's this error that I get after a repo gets indexed:
here's the code for sending the indexing request: |
Nevermind, I fixed it. |
I noticed that but after I asked a question, I got exit 1 error.
|
Fixed with the last commit π |
I added some parsing errors and some documentation here and there. Also abstracted the SSE listening code and added support for |
I think this is in a place to test live, but only after we switch the Azure deployment. open-sauced/repo-query#10 It would also be nice to format the response return a little syntax highlighting. Not sure if that is a repo-query thing (via system prompt asking for syntax highlight) or something we can do with the response in cobra. Here is the output in markdown:
Here is a screencap from the terminal: |
I didn't want to add a dependency without @jpmcb's suggestion. Also, yeah, the response is markdown. For the "\n"s, it's a known issue, the server sends "\\n", so this gets rendered as a normal string. The markdown parser for the open-sauced/ai interface has the same problem (the prompt needs to fix this server-side). |
@bdougie - I was thinking the exact same thing. Yes, this is something we can absolutely tackle and would be trivial with the package main
import (
"fmt"
)
func main() {
myString := "This is a string\n\nwith newlines"
fmt.Println(myString)
} this prints a the string as:
As far as deeper syntax highlighting (like with backticks But for now, interpreting the newlines as literal would be a great first step. |
@diivi - I'd use a string replacer then: package main
import (
"fmt"
"strings"
)
func main() {
myString := "This is a string\\n\\nwith newlines"
replacer := strings.NewReplacer(
"\\n", "\n",
)
myString = replacer.Replace(myString)
fmt.Println(myString)
} this returns the correct bits for the string to be formated by |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think overall this looks good ππΌ I'm sure there will be things to iterate on: for example, I'm hoping to integrate a fancier logging library that was made for CLI applications #17
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the approach and look forward to seeing how this evolves.
Description
Fixes #14
What type of PR is this? (check all applicable)
Related Tickets & Documents
#14
Mobile & Desktop Screenshots/Recordings
Implemented a loop for QnA after I recorded this GIF.
Added tests?
Added to documentation?
[optional] Are there any post-deployment tasks we need to perform?
[optional] What gif best describes this PR or how it makes you feel?