cowork-dash 0.1.4__py3-none-any.whl → 0.1.6__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
cowork_dash/agent.py CHANGED
@@ -1,3 +1,4 @@
1
+ import os
1
2
  import uuid
2
3
  from deepagents import create_deep_agent
3
4
  from langgraph.checkpoint.memory import InMemorySaver
@@ -85,14 +86,16 @@ Work iteratively like a human using Jupyter:
85
86
  4. Keep cells focused on single tasks for easier debugging
86
87
 
87
88
  ### General
88
- 1. Use write_todos to track your progress and next steps
89
- 2. Use think_tool to reason through complex problems
89
+ 1. ALWAYS use write_todos to track your progress and next steps
90
+ 2. ALWAYS think_tool to reason through reqests, irrespective of complexity
90
91
  3. Be proactive in exploring the filesystem when relevant
91
92
  4. Provide clear, helpful responses
92
93
 
93
94
  The workspace is your sandbox - feel free to create files, organize content, and help users manage their projects."""
94
95
 
95
- backend = FilesystemBackend(root_dir=str("./"), virtual_mode=True)
96
+ # Get workspace root from environment variable or default to current directory
97
+ workspace_root = os.getenv("DEEPAGENT_WORKSPACE_ROOT", os.getcwd())
98
+ backend = FilesystemBackend(root_dir=workspace_root, virtual_mode=True)
96
99
 
97
100
  agent = create_deep_agent(
98
101
  system_prompt=SYSTEM_PROMPT,
@@ -113,6 +116,6 @@ agent = create_deep_agent(
113
116
  get_notebook_canvas_items,
114
117
  clear_notebook_canvas_items,
115
118
  ],
116
- # interrupt_on=dict(bash=True),
119
+ interrupt_on=dict(bash=True),
117
120
  checkpointer=InMemorySaver()
118
121
  )