Skip to content

Commit 0f3dd95

Browse files
committed
feat: add makefile
1 parent 322e438 commit 0f3dd95

File tree

3 files changed

+21
-2
lines changed

3 files changed

+21
-2
lines changed

Makefile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.PHONY: chat logs
2+
3+
install:
4+
uv sync && uv run pre-commit install
5+
6+
chat:
7+
uv run chat
8+
9+
logs:
10+
uv run textual console -x SYSTEM -x EVENT -x DEBUG -x INFO

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ This tool is for those who wish for slightly more control over their MCP servers
1515
This app uses [uv](https://github.com/astral-sh/uv) for package management so first install that. Then:
1616

1717
- `git clone https://github.com/damassi/agent-chat-cli-python.git`
18-
- `uv sync`
19-
- `uv run chat`
18+
- `make install`
19+
- `make chat`
2020

2121
Additional MCP servers are configured in `agent-chat-cli.config.yaml` and prompts added within the `prompts` folder.
2222

src/agent_chat_cli/app.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1+
import logging
12
import asyncio
3+
24
from textual.app import App, ComposeResult
35
from textual.containers import VerticalScroll
46
from textual.binding import Binding
7+
from textual.logging import TextualHandler
58

69
from agent_chat_cli.components.header import Header
710
from agent_chat_cli.components.chat_history import ChatHistory, MessagePosted
@@ -14,6 +17,11 @@
1417

1518
load_dotenv()
1619

20+
logging.basicConfig(
21+
level="NOTSET",
22+
handlers=[TextualHandler()],
23+
)
24+
1725

1826
class AgentChatCLIApp(App):
1927
CSS_PATH = "utils/styles.tcss"
@@ -37,6 +45,7 @@ def compose(self) -> ComposeResult:
3745
yield UserInput(query=self.agent_loop.query)
3846

3947
async def on_mount(self) -> None:
48+
logging.debug("Starting agent loop...")
4049
asyncio.create_task(self.agent_loop.start())
4150

4251
async def on_message_posted(self, event: MessagePosted) -> None:

0 commit comments

Comments
 (0)