Skip to content

Commit

Permalink
Update core.py with increased output lines and code theme option
Browse files Browse the repository at this point in the history
  • Loading branch information
ncoop57 committed Nov 19, 2024
1 parent fbd31a6 commit c811d05
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions bash_buddy/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ def main(
query: Param('The query to send to the LLM', str, nargs="+"),
NH: bool = False, # Don't include terminal history
n: int = 200, # Number of history lines
o: int = 30, # Number of output lines before piping to less
o: int = 70, # Number of output lines before piping to less
code_theme: str = 'monokai', # The code theme to use when rendering BashBuddy's responses
):
query = ' '.join(query)
ctxt = ""
Expand All @@ -70,4 +71,4 @@ def main(
if len(r.splitlines()) > o:
p = subprocess.Popen(['less'], stdin=subprocess.PIPE)
p.communicate(input=r.encode())
else: print(Markdown(r))
else: print(Markdown(r, code_theme=code_theme))

0 comments on commit c811d05

Please sign in to comment.