← Về thư mục
openai4s/server/plans.py
- carries_plan_mode_prompt · function · L72-L74 — def carries_plan_mode_prompt(text: str) -> bool
- plan_mode_request_text · function · L89-L109 — def plan_mode_request_text(text: str) -> str
- plan_draft_instruction · function · L112-L118 — def plan_draft_instruction(user_text: str) -> str | None
- MessageRunner · class · L121-L132 — class MessageRunner(Protocol)
- call · method · L124-L132 — def call( self, root_frame_id: str, project_id: str, user_text: str, model: str | None = None, *, plan: bool = False, ) -> dict[str, Any]
- PlanSession · class · L135-L141 — class PlanSession(Protocol)
- PlanService · class · L144-L873 — class PlanService
- init · method · L147-L156 — def init( self, *, store: Store, emitter_for: EmitterFactory, run_message: MessageRunner, ) -> None
- finalize · method · L158-L222 — def finalize( self, session: PlanSession, reply: str, prose: str, emit: EventSink, ) -> dict[str, Any] | None
- write_artifact · method · L224-L274 — def write_artifact( self, session: PlanSession, plan: dict[str, Any], artifact_id: str | None, emit: EventSink, ) -> dict[str, Any] | None
- emit_ready · method · L276-L294 — def emit_ready( self, emit: EventSink, root_frame_id: str, plan: dict[str, Any] | None, ) -> None
- get_state · method · L296-L303 — def get_state(self, root_frame_id: str) -> dict[str, Any]
- discard · method · L305-L320 — def discard(self, root_frame_id: str) -> dict[str, Any]
- plan_language · method · L322-L345 — def plan_language(self, plan: dict[str, Any] | None, *extra: str) -> str
- _drafting_request · method · L347-L369 — def _drafting_request(self, plan: dict[str, Any] | None) -> str
- _step_lines · method · L372-L392 — def _step_lines(steps: list[dict[str, Any]], zh: bool) -> list[str]
- execution_seed · method · L394-L433 — def execution_seed(self, plan: dict[str, Any]) -> str
- unfinished_steps · method · L451-L468 — def unfinished_steps(self, plan: dict[str, Any]) -> list[dict[str, Any]]
- _status_after_turn · method · L470-L496 — def _status_after_turn(self, plan_id: str, final_status: str) -> str
- resume_seed · method · L498-L573 — def resume_seed(self, plan: dict[str, Any], remaining: list[dict[str, Any]]) -> str
- claim_approval · method · L575-L616 — def claim_approval(self, root_frame_id: str) -> dict[str, Any]
- claim_resume · method · L618-L660 — def claim_resume(self, root_frame_id: str) -> dict[str, Any]
- resume_execution · method · L662-L750 — def resume_execution( self, root_frame_id: str, project_id: str, model: str | None = None, *, claimed_plan_id: str | None = None, ) -> dict[str, Any]
- run_execution · method · L752-L835 — def run_execution( self, root_frame_id: str, project_id: str, model: str | None = None, *, claimed_plan_id: str | None = None, ) -> dict[str, Any]
- run_revision · method · L837-L873 — def run_revision( self, root_frame_id: str, project_id: str, changes: str, model: str | None = None, ) -> dict[str, Any]
- short_hash · function · L876-L877 — def short_hash(text: str) -> str
- slugify · function · L880-L883 — def slugify(text: str, maxlen: int = 44) -> str
- plan_filename · function · L886-L887 — def plan_filename(title: str, root_frame_id: str) -> str
- _try_json · function · L890-L894 — def _try_json(text: str) -> Any
- _first_json_object · function · L897-L923 — def _first_json_object(text: str) -> Any
- extract_plan_json · function · L926-L941 — def extract_plan_json(reply: str) -> Any
- _steps_from_prose · function · L947-L969 — def _steps_from_prose(prose: str) -> list[dict[str, Any]]
- normalize_plan · function · L972-L1035 — def normalize_plan( raw: Any, prose: str = "", task_hint: str = "", ) -> dict[str, Any]
- public_plan · function · L1038-L1060 — def public_plan(plan: dict[str, Any] | None) -> dict[str, Any] | None