Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/google/adk/tools/skill_toolset.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ async def run_async(
agent_name = tool_context.agent_name
state_key = f"_adk_activated_skill_{agent_name}"

activated_skills = list(tool_context.state.get(state_key, []))
activated_skills = list(tool_context.state.get(state_key) or [])
if skill_name not in activated_skills:
activated_skills.append(skill_name)
tool_context.state[state_key] = activated_skills
Expand Down Expand Up @@ -791,7 +791,7 @@ async def _resolve_additional_tools_from_state(

agent_name = readonly_context.agent_name
state_key = f"_adk_activated_skill_{agent_name}"
activated_skills = readonly_context.state.get(state_key, [])
activated_skills = readonly_context.state.get(state_key) or []

if not activated_skills:
return []
Expand Down
Loading