Skip to content

Commit f38dff6

Browse files
authored
Merge pull request #1580 from OpenInterpreter/Windows-ui-fix
Windows UI fix
2 parents 969bc11 + ce106f9 commit f38dff6

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

interpreter/ui/markdown.py

+3
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ class MarkdownElement(Enum):
2222

2323
class MarkdownRenderer:
2424
def __init__(self):
25+
if os.name == "nt":
26+
import colorama
27+
colorama.init()
2528
# ANSI escape codes
2629
self.BOLD = "\033[1m"
2730
self.CODE = "\033[7m" # Regular inline code stays inverted

interpreter/ui/tool.py

+3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414

1515
class ContentRenderer:
1616
def __init__(self, style):
17+
if os.name == "nt":
18+
import colorama
19+
colorama.init()
1720
self.buffer = ""
1821
self.started = False
1922
self.style = style

pyproject.toml

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ pillow = ">=10.3.0"
2626
uvicorn = "^0.32.0"
2727
pynput = "^1.7.7"
2828
httpx = "0.27.2"
29+
colorama = "^0.4.6"
2930

3031
[build-system]
3132
requires = ["poetry-core>=1.0.0"]

0 commit comments

Comments
 (0)