[Python] Set default value for ephemeral parameter in log_message method to False#812
[Python] Set default value for ephemeral parameter in log_message method to False#812brettcannon wants to merge 3 commits intogithub:mainfrom
False#812Conversation
…alse` Also narrow the type along the way.
There was a problem hiding this comment.
Pull request overview
Updates the Python SDK’s CopilotSession.log() API to make ephemeral default to False (and narrows its type), while also adjusting the method’s docstring.
Changes:
- Set
CopilotSession.log(..., ephemeral=...)default fromNonetoFalseand narrow the parameter type tobool. - Update
log()docstring text describing defaults forlevelandephemeral.
|
@brettcannon This changes the semantics a bit. Previously we could differentiate "false" and "not set", but we'd lose that distinction with this change. I think we'd be better off documenting the behavior as "If the flag is not set, the underlying runtime applies its own rules to control whether the log message is ephemeral". For example we might want info-level messages to be ephemeral and errors not to be ephemeral, or to use other runtime conditions to decide. All the other languages are consistent with this too, except for Go which actually fails to send "false" values at all from this API. I'm fixing Go separately in #827 |
SGTM! I'll close this PR. |
Also narrow the parameter's type along the way.