Enhance sandbox functionality and MCP tools

This commit enhances the sandbox functionality by:
- Adding a new jj_log tool to retrieve commit history
- Refactoring sandbox tools into dedicated modules
- Improving project management with session-based active projects
- Updating Docker configuration to properly mount the sandbox volume
- Adding proper error handling and documentation for all tools
- Updating dependencies and configuration files
This commit is contained in:
2026-01-25 21:26:22 +01:00
parent 766b90a548
commit bc66c794a5
13 changed files with 281 additions and 81 deletions

View File

@@ -1,5 +1,6 @@
import json
import re
from ollama import prompt
@@ -21,8 +22,8 @@ def structure_to_json(text, schema):
full_prompt = f"""Transform the following structured text into JSON according to the given schema.
**Return only valid JSON, without any Markdown formatting :**
- no backticks,
- no code blocks,
- no backticks,
- no code blocks,
- no extra text
Input text:
@@ -32,7 +33,7 @@ Schema:
{schema_json}"""
# Send to Ollama
response = prompt("ollama:qwen3:0.6b", full_prompt, allow_pull=True)
response = prompt("qwen3:0.6b", full_prompt, allow_pull=True)
# Remove any markdown formatting (backticks, code blocks) that Ollama might include
# Only remove backticks at the beginning or end of the response, not those within the JSON