Skip to content

Commit 6582802

Browse files
committed
fix: add mcp SDK to dependencies and fix file encoding in utils
- Add mcp>=1.0.0 to pyproject.toml dependencies (fixes ModuleNotFoundError on fresh install) - Add explicit utf-8 encoding to FileManager file operations
1 parent 92b3e98 commit 6582802

3 files changed

Lines changed: 11 additions & 10 deletions

File tree

codewiki/src/utils.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,28 +18,28 @@ def ensure_directory(path: str) -> None:
1818
@staticmethod
1919
def save_json(data: Any, filepath: str) -> None:
2020
"""Save data as JSON to file."""
21-
with open(filepath, 'w') as f:
22-
json.dump(data, f, indent=4)
23-
21+
with open(filepath, 'w', encoding='utf-8') as f:
22+
json.dump(data, f, indent=4, ensure_ascii=False)
23+
2424
@staticmethod
2525
def load_json(filepath: str) -> Optional[Dict[str, Any]]:
2626
"""Load JSON from file, return None if file doesn't exist."""
2727
if not os.path.exists(filepath):
2828
return None
29-
30-
with open(filepath, 'r') as f:
29+
30+
with open(filepath, 'r', encoding='utf-8') as f:
3131
return json.load(f)
32-
32+
3333
@staticmethod
3434
def save_text(content: str, filepath: str) -> None:
3535
"""Save text content to file."""
36-
with open(filepath, 'w') as f:
36+
with open(filepath, 'w', encoding='utf-8') as f:
3737
f.write(content)
38-
38+
3939
@staticmethod
4040
def load_text(filepath: str) -> str:
4141
"""Load text content from file."""
42-
with open(filepath, 'r') as f:
42+
with open(filepath, 'r', encoding='utf-8') as f:
4343
return f.read()
4444

4545
file_manager = FileManager()

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ dependencies = [
5757
"python-multipart>=0.0.20",
5858
"colorama>=0.4.6",
5959
"logfire>=4.1.0",
60-
"coding-agent-wrapper>=0.1.2"
60+
"coding-agent-wrapper>=0.1.2",
61+
"mcp>=1.0.0"
6162
]
6263

6364
[external]

0 commit comments

Comments
 (0)