Skip to content

Commit 8a83ebb

Browse files
committed
fix(core): use eil guard and add log for original_date in task_agent
Match the established pattern from skill_learner.py for consistency and observability when parsing original_date from session configs.
1 parent 29e370c commit 8a83ebb

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

  • src/server/core/acontext_core/llm/agent

src/server/core/acontext_core/llm/agent/task.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -133,12 +133,15 @@ async def task_agent_curd(
133133
async with DB_CLIENT.get_session_context() as db_session:
134134
# Get session configs to extract original_date
135135
r_sess = await SD.fetch_session(db_session, session_id)
136-
session, _ = r_sess.unpack()
137-
original_date = (
138-
session.configs.get("original_date")
139-
if session and session.configs
140-
else None
141-
)
136+
session, eil = r_sess.unpack()
137+
original_date = None
138+
if not eil and session and session.configs:
139+
original_date = session.configs.get("original_date")
140+
LOG.info(
141+
"task_agent.original_date_parsed",
142+
session_id=str(session_id),
143+
original_date=original_date,
144+
)
142145

143146
r = await TD.fetch_current_tasks(db_session, session_id)
144147
tasks, eil = r.unpack()

0 commit comments

Comments
 (0)