Merge remote-tracking branch 'origin/main' into main
Resolve the navigate() leaf conflict: keep the local two-stage navigation
refactor (descriptions, confirm_category_fit, create_skill removed from the
leaf softmax) and apply origin's compose_state intent on top.
origin/main (857ad1a) was not runnable as pushed:
- compose_state renamed its param to additional_context but its body still
read `current` (NameError) and _navigate_canned called it with a stray
`additional_context:` annotation (SyntaxError).
- the rename was not propagated to scheduler.py's two callers (TypeError).
Resolution:
- compose_state(request, additional_context=None) renders `({additional_context})`.
- canned + navigate leaf decisions pass
additional_context=f"all choices are within the {category} category".
- scheduler.py builds its state inline to keep the exact
`[current process: …]` wording for the interrupt/priority decisions.
This commit is contained in:
commit
da53e1eefc
3 files changed
+18
-10
No files matched your search
@@ -49,7 +49,6 @@ from .skills import (
|
||||
SkillStore,
|
||||
build_skills,
|
||||
build_tree,
|
||||
compose_state,
|
||||
confirm_skill_fit,
|
||||
generate_category,
|
||||
generate_skill,
|
||||
@@ -273,7 +272,7 @@ class Scheduler:
|
||||
|
||||
def _interrupt_choice(self, request: Request, current: Process) -> bool:
|
||||
decision = DecisionRequest(
|
||||
state=compose_state(request, current=current.skill),
|
||||
state=f"{request.text} [current process: {current.skill}]",
|
||||
question="Should this be allowed to interrupt the current process?",
|
||||
options=[
|
||||
Option(CHOICE_INTERRUPT, "Yes, interrupt the current process."),
|
||||
@@ -290,7 +289,7 @@ class Scheduler:
|
||||
|
||||
def _priority_score(self, request: Request, current: str | None = None) -> tuple[float, str]:
|
||||
decision = DecisionRequest(
|
||||
state=compose_state(request, current=current),
|
||||
state=f"{request.text} [current process: {current}]",
|
||||
question="How urgent is this request?",
|
||||
options=[Option(option_id, description) for option_id, description in URGENCY_OPTIONS],
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user