checkpoint dealing with personal manager/editor
This commit is contained in:
@@ -363,3 +363,4 @@ def main() -> None:
|
|||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
||||||
|
|
||||||
|
|||||||
@@ -2400,3 +2400,4 @@ def get_history_bleed_stats(md_content: Optional[str] = None) -> dict[str, Any]:
|
|||||||
"current": 0,
|
"current": 0,
|
||||||
"percentage": 0,
|
"percentage": 0,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -223,3 +223,4 @@ class ApiHookClient:
|
|||||||
def get_patch_status(self) -> dict[str, Any]:
|
def get_patch_status(self) -> dict[str, Any]:
|
||||||
"""Gets the current patch modal status."""
|
"""Gets the current patch modal status."""
|
||||||
return self._make_request('GET', '/api/patch/status') or {}
|
return self._make_request('GET', '/api/patch/status') or {}
|
||||||
|
|
||||||
|
|||||||
@@ -523,3 +523,4 @@ class HookServer:
|
|||||||
if self.thread:
|
if self.thread:
|
||||||
self.thread.join()
|
self.thread.join()
|
||||||
logging.info("Hook server stopped")
|
logging.info("Hook server stopped")
|
||||||
|
|
||||||
|
|||||||
@@ -63,3 +63,4 @@ def get_bg():
|
|||||||
if _bg is None:
|
if _bg is None:
|
||||||
_bg = BackgroundShader()
|
_bg = BackgroundShader()
|
||||||
return _bg
|
return _bg
|
||||||
|
|
||||||
|
|||||||
@@ -118,3 +118,4 @@ if __name__ == "__main__":
|
|||||||
test_skeletons = "class NewFeature: pass"
|
test_skeletons = "class NewFeature: pass"
|
||||||
tickets = generate_tickets(test_brief, test_skeletons)
|
tickets = generate_tickets(test_brief, test_skeletons)
|
||||||
print(json.dumps(tickets, indent=2))
|
print(json.dumps(tickets, indent=2))
|
||||||
|
|
||||||
|
|||||||
@@ -59,3 +59,4 @@ def estimate_cost(model: str, input_tokens: int, output_tokens: int) -> float:
|
|||||||
return input_cost + output_cost
|
return input_cost + output_cost
|
||||||
|
|
||||||
return 0.0
|
return 0.0
|
||||||
|
|
||||||
|
|||||||
@@ -193,3 +193,4 @@ class ExecutionEngine:
|
|||||||
ticket = self.dag.ticket_map.get(task_id)
|
ticket = self.dag.ticket_map.get(task_id)
|
||||||
if ticket:
|
if ticket:
|
||||||
ticket.status = status
|
ticket.status = status
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
from typing import List, Dict, Optional, Tuple
|
from typing import List, Dict, Optional, Tuple
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
import shutil
|
import shutil
|
||||||
import os
|
import os
|
||||||
|
|||||||
@@ -126,3 +126,4 @@ class UserRequestEvent:
|
|||||||
"disc_text": self.disc_text,
|
"disc_text": self.disc_text,
|
||||||
"base_dir": self.base_dir
|
"base_dir": self.base_dir
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -376,3 +376,4 @@ def evict(path: Path) -> None:
|
|||||||
def list_cached() -> List[Dict[str, Any]]:
|
def list_cached() -> List[Dict[str, Any]]:
|
||||||
return []
|
return []
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -189,3 +189,4 @@ class GeminiCliAdapter:
|
|||||||
"""
|
"""
|
||||||
total_chars = len("\n".join(contents))
|
total_chars = len("\n".join(contents))
|
||||||
return total_chars // 4
|
return total_chars // 4
|
||||||
|
|
||||||
|
|||||||
@@ -115,3 +115,4 @@ class LogPruner:
|
|||||||
sys.stderr.write(f"[LogPruner] Error removing {resolved_path}: {e}\n")
|
sys.stderr.write(f"[LogPruner] Error removing {resolved_path}: {e}\n")
|
||||||
|
|
||||||
self.log_registry.save_registry()
|
self.log_registry.save_registry()
|
||||||
|
|
||||||
|
|||||||
@@ -301,3 +301,4 @@ class LogRegistry:
|
|||||||
})
|
})
|
||||||
return old_sessions
|
return old_sessions
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -166,3 +166,4 @@ def render_unindented(text: str) -> None:
|
|||||||
|
|
||||||
def render_code(code: str, lang: str = "", context_id: str = "default", block_idx: int = 0) -> None:
|
def render_code(code: str, lang: str = "", context_id: str = "default", block_idx: int = 0) -> None:
|
||||||
get_renderer().render_code(code, lang, context_id, block_idx)
|
get_renderer().render_code(code, lang, context_id, block_idx)
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# mcp_client.py
|
# mcp_client.py
|
||||||
"""
|
"""
|
||||||
MCP Client - Multi-tool filesystem and network operations with sandboxing.
|
MCP Client - Multi-tool filesystem and network operations with sandboxing.
|
||||||
|
|
||||||
@@ -782,10 +782,10 @@ def get_tree(path: str, max_depth: int = 2) -> str:
|
|||||||
entries = [e for e in entries if not e.name.startswith('.') and e.name not in ('__pycache__', 'venv', 'env') and e.name != "history.toml" and not e.name.endswith("_history.toml")]
|
entries = [e for e in entries if not e.name.startswith('.') and e.name not in ('__pycache__', 'venv', 'env') and e.name != "history.toml" and not e.name.endswith("_history.toml")]
|
||||||
for i, entry in enumerate(entries):
|
for i, entry in enumerate(entries):
|
||||||
is_last = (i == len(entries) - 1)
|
is_last = (i == len(entries) - 1)
|
||||||
connector = "└── " if is_last else "├── "
|
connector = "└── " if is_last else "├── "
|
||||||
lines.append(f"{prefix}{connector}{entry.name}")
|
lines.append(f"{prefix}{connector}{entry.name}")
|
||||||
if entry.is_dir():
|
if entry.is_dir():
|
||||||
extension = " " if is_last else "│ "
|
extension = " " if is_last else "│ "
|
||||||
lines.extend(_build_tree(entry, current_depth + 1, prefix + extension))
|
lines.extend(_build_tree(entry, current_depth + 1, prefix + extension))
|
||||||
return lines
|
return lines
|
||||||
tree_lines = [f"{p.name}/"] + _build_tree(p, 1)
|
tree_lines = [f"{p.name}/"] + _build_tree(p, 1)
|
||||||
@@ -1466,3 +1466,4 @@ MCP_TOOL_SPECS: list[dict[str, Any]] = [
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -178,3 +178,4 @@ RULES:
|
|||||||
|
|
||||||
Analyze this error and generate the patch:
|
Analyze this error and generate the patch:
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|||||||
@@ -614,3 +614,4 @@ def run_worker_lifecycle(ticket: Ticket, context: WorkerContext, context_files:
|
|||||||
if event_queue:
|
if event_queue:
|
||||||
_queue_put(event_queue, "ticket_completed", {"ticket_id": ticket.id, "timestamp": time.time()})
|
_queue_put(event_queue, "ticket_completed", {"ticket_id": ticket.id, "timestamp": time.time()})
|
||||||
return response
|
return response
|
||||||
|
|
||||||
|
|||||||
@@ -86,3 +86,4 @@ class NativeOrchestrator:
|
|||||||
"""Tier 4: Generate patch for error"""
|
"""Tier 4: Generate patch for error"""
|
||||||
from src import ai_client
|
from src import ai_client
|
||||||
return ai_client.run_tier4_patch_generation(error, file_context)
|
return ai_client.run_tier4_patch_generation(error, file_context)
|
||||||
|
|
||||||
|
|||||||
@@ -125,3 +125,4 @@ if __name__ == "__main__":
|
|||||||
history = get_track_history_summary()
|
history = get_track_history_summary()
|
||||||
tracks = generate_tracks("Implement a basic unit test for the ai_client.py module.", flat, file_items, history_summary=history)
|
tracks = generate_tracks("Implement a basic unit test for the ai_client.py module.", flat, file_items, history_summary=history)
|
||||||
print(json.dumps(tracks, indent=2))
|
print(json.dumps(tracks, indent=2))
|
||||||
|
|
||||||
|
|||||||
@@ -87,3 +87,4 @@ def get_outline(path: Path, code: str) -> str:
|
|||||||
return outliner.outline(code)
|
return outliner.outline(code)
|
||||||
else:
|
else:
|
||||||
return f"Outlining not supported for {suffix} files yet."
|
return f"Outlining not supported for {suffix} files yet."
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
from typing import Optional, Callable, List
|
from typing import Optional, Callable, List
|
||||||
from dataclasses import dataclass, field
|
from dataclasses import dataclass, field
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
|
|||||||
@@ -110,3 +110,4 @@ def get_archive_dir() -> Path:
|
|||||||
def reset_resolved() -> None:
|
def reset_resolved() -> None:
|
||||||
"""For testing only - clear cached resolutions."""
|
"""For testing only - clear cached resolutions."""
|
||||||
_RESOLVED.clear()
|
_RESOLVED.clear()
|
||||||
|
|
||||||
|
|||||||
@@ -232,3 +232,4 @@ class PerformanceMonitor:
|
|||||||
self._stop_event.set()
|
self._stop_event.set()
|
||||||
if self._cpu_thread.is_alive():
|
if self._cpu_thread.is_alive():
|
||||||
self._cpu_thread.join(timeout=2.0)
|
self._cpu_thread.join(timeout=2.0)
|
||||||
|
|
||||||
|
|||||||
@@ -82,3 +82,4 @@ class PersonaManager:
|
|||||||
path.parent.mkdir(parents=True, exist_ok=True)
|
path.parent.mkdir(parents=True, exist_ok=True)
|
||||||
with open(path, "wb") as f:
|
with open(path, "wb") as f:
|
||||||
tomli_w.dump(data, f)
|
tomli_w.dump(data, f)
|
||||||
|
|
||||||
|
|||||||
@@ -89,3 +89,4 @@ class PresetManager:
|
|||||||
path.parent.mkdir(parents=True, exist_ok=True)
|
path.parent.mkdir(parents=True, exist_ok=True)
|
||||||
with open(path, "wb") as f:
|
with open(path, "wb") as f:
|
||||||
f.write(tomli_w.dumps(data).encode("utf-8"))
|
f.write(tomli_w.dumps(data).encode("utf-8"))
|
||||||
|
|
||||||
|
|||||||
@@ -391,3 +391,4 @@ def calculate_track_progress(tickets: list) -> dict:
|
|||||||
"blocked": blocked,
|
"blocked": blocked,
|
||||||
"todo": todo
|
"todo": todo
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -217,3 +217,4 @@ def log_cli_call(command: str, stdin_content: Optional[str], stdout_content: Opt
|
|||||||
_cli_fh.flush()
|
_cli_fh.flush()
|
||||||
except Exception:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|||||||
@@ -70,3 +70,4 @@ def apply_faux_acrylic_glass(draw_list: imgui.ImDrawList, p_min: imgui.ImVec2, p
|
|||||||
flags=imgui.ImDrawFlags_.round_corners_all if rounding > 0 else imgui.ImDrawFlags_.none,
|
flags=imgui.ImDrawFlags_.round_corners_all if rounding > 0 else imgui.ImDrawFlags_.none,
|
||||||
thickness=1.0
|
thickness=1.0
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -90,3 +90,4 @@ def run_powershell(script: str, base_dir: str, qa_callback: Optional[Callable[[s
|
|||||||
if 'process' in locals() and process:
|
if 'process' in locals() and process:
|
||||||
subprocess.run(["taskkill", "/F", "/T", "/PID", str(process.pid)], capture_output=True)
|
subprocess.run(["taskkill", "/F", "/T", "/PID", str(process.pid)], capture_output=True)
|
||||||
return f"ERROR: {e}"
|
return f"ERROR: {e}"
|
||||||
|
|
||||||
|
|||||||
@@ -190,3 +190,4 @@ def build_summary_markdown(file_items: list[dict[str, Any]]) -> str:
|
|||||||
summary = item.get("summary", "")
|
summary = item.get("summary", "")
|
||||||
parts.append(f"### `{path}`\n\n{summary}")
|
parts.append(f"### `{path}`\n\n{summary}")
|
||||||
return "\n\n---\n\n".join(parts)
|
return "\n\n---\n\n".join(parts)
|
||||||
|
|
||||||
|
|||||||
@@ -388,3 +388,4 @@ def load_from_config(config: dict[str, Any]) -> None:
|
|||||||
if font_path:
|
if font_path:
|
||||||
apply_font(font_path, font_size)
|
apply_font(font_path, font_size)
|
||||||
set_scale(scale)
|
set_scale(scale)
|
||||||
|
|
||||||
|
|||||||
@@ -392,3 +392,4 @@ def get_tweaked_theme() -> hello_imgui.ImGuiTweakedTheme:
|
|||||||
# Sync tweaks
|
# Sync tweaks
|
||||||
tt.tweaks.rounding = 6.0
|
tt.tweaks.rounding = 6.0
|
||||||
return tt
|
return tt
|
||||||
|
|
||||||
|
|||||||
@@ -82,3 +82,4 @@ def apply_nerv() -> None:
|
|||||||
style.popup_border_size = 1.0
|
style.popup_border_size = 1.0
|
||||||
style.child_border_size = 1.0
|
style.child_border_size = 1.0
|
||||||
style.tab_border_size = 1.0
|
style.tab_border_size = 1.0
|
||||||
|
|
||||||
|
|||||||
@@ -83,3 +83,4 @@ class AlertPulsing:
|
|||||||
alpha = 0.05 + 0.15 * ((math.sin(time.time() * 4.0) + 1.0) / 2.0)
|
alpha = 0.05 + 0.15 * ((math.sin(time.time() * 4.0) + 1.0) / 2.0)
|
||||||
color = imgui.get_color_u32((1.0, 0.0, 0.0, alpha))
|
color = imgui.get_color_u32((1.0, 0.0, 0.0, alpha))
|
||||||
draw_list.add_rect((0.0, 0.0), (width, height), color, 0.0, 0, 10.0)
|
draw_list.add_rect((0.0, 0.0), (width, height), color, 0.0, 0, 10.0)
|
||||||
|
|
||||||
|
|||||||
@@ -63,3 +63,4 @@ class ToolBiasEngine:
|
|||||||
lines.append(f"- {cat}: {mult}x")
|
lines.append(f"- {cat}: {mult}x")
|
||||||
|
|
||||||
return "\n\n".join(lines)
|
return "\n\n".join(lines)
|
||||||
|
|
||||||
|
|||||||
@@ -108,3 +108,4 @@ class ToolPresetManager:
|
|||||||
if "bias_profiles" in data and name in data["bias_profiles"]:
|
if "bias_profiles" in data and name in data["bias_profiles"]:
|
||||||
del data["bias_profiles"][name]
|
del data["bias_profiles"][name]
|
||||||
self._write_raw(path, data)
|
self._write_raw(path, data)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user