@microsoft/windows-admin-center-sdk
Version:
Microsoft - Windows Admin Center Shell
71 lines (70 loc) • 2.94 kB
TypeScript
import { Observable } from 'rxjs';
import { AppContext } from '../data/app-context';
import { RpcObservableCopilotClient } from '../rpc/copilot/rpc-observable-copilot-client';
import { RpcObservableCopilotConfigServer } from '../rpc/copilot/rpc-observable-copilot-config-server';
import { RpcObservableCopilotError, RpcObservableCopilotResult } from '../rpc/copilot/rpc-observable-copilot-model';
export declare class CopilotExtensionService {
protected appContext: AppContext;
/**
* The RpcObservableCopilotConfigServer class for sending.
*/
rpcObservableCopilotClient: RpcObservableCopilotClient;
/**
* The RpcObservableCopilotConfigServer classf for receiving.
*/
rpcObservableCopilotConfigServer: RpcObservableCopilotConfigServer;
/**
* Request handlers for different types of requests.
*/
private requestHandlers;
private readonly serviceName;
private copilotResultMessage;
constructor(appContext: AppContext);
/**
* Register custom handlers for different types of requests.
* @param customHandlers Custom handlers for different types of requests.
*/
registerRpcHandler(customHandlers?: {}): void;
/**
* Send to shell by rpc and then request shell to send prompt from extension to copilot.
* @param prompt the prompt to send to copilot
*
*/
sendToShellSendingPromptToCopilot(prompt: string): Observable<RpcObservableCopilotResult | RpcObservableCopilotError>;
/**
* Send to shell by rpc to request sending copilot response to extension.
* @param response the response to send to extension.
* @param targetExtension the target extension to send the response.
*/
sendToShellSendingCopilotResponseToExtension(response: string, targetExtension: string): Observable<RpcObservableCopilotResult | RpcObservableCopilotError>;
/**
* Send to shell by rpc to request for theme update.
*/
sendToShellUpdateTheme(): Observable<RpcObservableCopilotResult | RpcObservableCopilotError>;
/**
* Send to shell by rpc to request url
*/
sendToShellRequestUrl(): Observable<RpcObservableCopilotResult | RpcObservableCopilotError>;
/**
* Send to shell by rpc to request tool
*/
sendToShellRequestTool(): Observable<RpcObservableCopilotResult | RpcObservableCopilotError>;
/**
* Send to shell by rpc to request active node.
*/
sendToShellRequestActiveNodeName(): Observable<RpcObservableCopilotResult | RpcObservableCopilotError>;
/**
* Send an RPC request to the specified target with the provided configuration.
*
* @param config The configuration object to send with the RPC request.
*/
private sendToShellByRpc;
/**
* Default handler for navigation request.
*/
private handleRouteNavigation;
/**
* Default handler for theme update request.
*/
private handleThemeChange;
}