-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsimple_test.py
More file actions
50 lines (39 loc) · 1.5 KB
/
simple_test.py
File metadata and controls
50 lines (39 loc) · 1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/usr/bin/env python3
"""
Simple test without full LangChain agent - just test our Things3 integration.
"""
import sys
import os
from pathlib import Path
# Add src to path
src_path = Path(__file__).parent / "src"
sys.path.insert(0, str(src_path))
from src.tools.simple_tools import SIMPLE_FUNCTIONS
from rich.console import Console
from rich.panel import Panel
console = Console()
def test_things3_integration():
"""Test our Things3 integration without the full agent."""
console.print(Panel.fit("🧪 Testing Things3 Integration", style="bold blue"))
# Test basic functions
functions_to_test = [
("get_today_tasks", []),
("analyze_today_view", ["I want to focus on work tasks today"]),
("search_tasks", ["test"]),
("get_work_tasks", []),
]
for func_name, args in functions_to_test:
console.print(f"\n[bold cyan]Testing {func_name}...[/bold cyan]")
try:
func = SIMPLE_FUNCTIONS[func_name]
if args:
result = func(*args)
else:
result = func()
console.print(f"[green]✓ {func_name} executed successfully[/green]")
console.print(f"Result: {result[:200]}..." if len(result) > 200 else f"Result: {result}")
except Exception as e:
console.print(f"[red]✗ {func_name} failed: {str(e)}[/red]")
console.print(f"\n[bold green]✓ Basic Things3 integration test completed![/bold green]")
if __name__ == "__main__":
test_things3_integration()