You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 32195ec
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: rust/README.md
+34Lines changed: 34 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -818,6 +818,40 @@ let client = Client::start(opts).await?;
818
818
819
819
The SDK injects the appropriate environment variables (`COPILOT_OTEL_EXPORTER_TYPE`, `OTEL_EXPORTER_OTLP_ENDPOINT`, `OTEL_EXPORTER_OTLP_PROTOCOL`, ...) into the spawned CLI process. The SDK takes no OpenTelemetry dependency; the CLI itself owns the exporter pipeline. Caller-supplied `ClientOptions::env` entries override telemetry-injected values.
820
820
821
+
### Message Source
822
+
823
+
Use `MessageSource::System` for automated messages sent by your application. Ordinary human sends leave `source` unset, so the field is omitted from the request. Use `MessageSource::User` when you need to set it explicitly.
824
+
825
+
```rust,no_run
826
+
use github_copilot_sdk::{MessageOptions, MessageSource, session::Session};
Both paths use ordinary `session.send`. Source does not select a delivery mode or set billing flags; the runtime applies its existing source behavior. `send_and_wait` still completes on `session.idle` and may return `Ok(None)` when no assistant message was emitted. Genuine errors still propagate.
854
+
821
855
### Progress Reporting (`send_and_wait`)
822
856
823
857
For fire-and-forget messaging where you need to block until the agent finishes:
0 commit comments