github_copilot_sdk/rpc.rs
1//! JSON-RPC request/response types and typed namespace builders.
2//!
3//! All types are auto-generated from the Copilot CLI protocol schemas.
4//! This module is the stable public access point — the underlying
5//! crate-private modules where the types are defined are an
6//! implementation detail whose layout may change.
7//!
8//! Use the [`crate::Client::rpc`] and [`crate::session::Session::rpc`] helper
9//! methods to obtain a typed view over the protocol surface.
10
11pub use crate::generated::api_types::*;
12pub use crate::generated::rpc::*;
13
14impl SendRequest {
15 /// Set the message provenance without changing other request options.
16 ///
17 /// When this is not called, the source field is omitted by default.
18 pub fn with_source(mut self, source: crate::MessageSource) -> Self {
19 self.source = Some(source.to_string());
20 self
21 }
22}