Skip to content

Commit 3bd64bd

Browse files
CopilotBukeLy
andcommitted
chore: guard empty command extraction
Co-authored-by: BukeLy <19304666+BukeLy@users.noreply.github.com>
1 parent d290c05 commit 3bd64bd

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

agent-sdk-client/config.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ def extract_command(text: Optional[str]) -> Optional[str]:
2626
command = parts[0]
2727
if '@' in command:
2828
command = command.split('@', 1)[0]
29-
return command or None
29+
if not command:
30+
return None
31+
return command
3032

3133

3234
def load_command_whitelist(config_path: Path = DEFAULT_CONFIG_PATH) -> list[str]:

0 commit comments

Comments
 (0)