pub struct SessionRpcCompletions<'a> { /* private fields */ }Expand description
session.completions.* RPCs.
Implementations§
Source§impl<'a> SessionRpcCompletions<'a>
impl<'a> SessionRpcCompletions<'a>
Sourcepub async fn get_trigger_characters(
&self,
) -> Result<CompletionsGetTriggerCharactersResult, Error>
pub async fn get_trigger_characters( &self, ) -> Result<CompletionsGetTriggerCharactersResult, Error>
Gets the characters that should trigger host-driven completions for the session. Empty disables host-driven completions (e.g. local sessions, or a relay host that does not advertise them).
Wire method: session.completions.getTriggerCharacters.
§Returns
Characters that, when typed in the composer, should trigger a completions.request. Empty when the session has no host-driven completions (e.g. local sessions, or a relay host that does not advertise completionTriggerCharacters).
Experimental. This API is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases. Pin both the SDK and CLI versions if your code depends on it.
Sourcepub async fn request(
&self,
params: CompletionsRequestRequest,
) -> Result<CompletionsRequestResult, Error>
pub async fn request( &self, params: CompletionsRequestRequest, ) -> Result<CompletionsRequestResult, Error>
Requests host-driven completion items for the current composer input. Returns an empty list when the host has no items or does not support completions.
Wire method: session.completions.request.
§Parameters
params- Request host-driven completions for the current composer input.
§Returns
Host-driven completion items for the current composer input. Empty when the host returns no items or does not support completions.
Experimental. This API is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases. Pin both the SDK and CLI versions if your code depends on it.
Trait Implementations§
Source§impl<'a> Clone for SessionRpcCompletions<'a>
impl<'a> Clone for SessionRpcCompletions<'a>
Source§fn clone(&self) -> SessionRpcCompletions<'a>
fn clone(&self) -> SessionRpcCompletions<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more