Files
deer-flow/backend/src/agents/thread_state.py

23 lines
619 B
Python
Raw Normal View History

from typing import NotRequired, TypedDict
2026-01-14 12:32:34 +08:00
from langchain.agents import AgentState
class SandboxState(TypedDict):
sandbox_id: NotRequired[str | None]
2026-01-14 12:32:34 +08:00
2026-01-15 13:22:30 +08:00
class ThreadDataState(TypedDict):
workspace_path: NotRequired[str | None]
uploads_path: NotRequired[str | None]
outputs_path: NotRequired[str | None]
2026-01-14 12:32:34 +08:00
class ThreadState(AgentState):
sandbox: NotRequired[SandboxState | None]
2026-01-15 13:22:30 +08:00
thread_data: NotRequired[ThreadDataState | None]
title: NotRequired[str | None]
2026-01-16 23:04:38 +08:00
artifacts: NotRequired[list[str] | None]
todos: NotRequired[list | None]
2026-01-23 18:47:39 +08:00
uploaded_files: NotRequired[list[dict] | None]