add ACP+ handlers for prompt editing (#10031)
This commit is contained in:
@@ -246,6 +246,70 @@ pub struct DiagnosticsGetResponse {
|
||||
pub report: serde_json::Value,
|
||||
}
|
||||
|
||||
/// Information about a prompt template, including its default content and customization status.
|
||||
#[derive(Debug, Default, Clone, Serialize, Deserialize, JsonSchema)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct PromptTemplateEntry {
|
||||
pub name: String,
|
||||
pub description: String,
|
||||
pub default_content: String,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub user_content: Option<String>,
|
||||
pub is_customized: bool,
|
||||
}
|
||||
|
||||
/// List all available Goose prompt templates.
|
||||
#[derive(Debug, Default, Clone, Serialize, Deserialize, JsonSchema, JsonRpcRequest)]
|
||||
#[request(method = "_goose/unstable/config/prompts/list", response = ListPromptsResponse)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct ListPromptsRequest {}
|
||||
|
||||
#[derive(Debug, Default, Clone, Serialize, Deserialize, JsonSchema, JsonRpcResponse)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct ListPromptsResponse {
|
||||
pub prompts: Vec<PromptTemplateEntry>,
|
||||
}
|
||||
|
||||
/// Read a Goose prompt template.
|
||||
#[derive(Debug, Default, Clone, Serialize, Deserialize, JsonSchema, JsonRpcRequest)]
|
||||
#[request(method = "_goose/unstable/config/prompts/get", response = GetPromptResponse)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct GetPromptRequest {
|
||||
pub name: String,
|
||||
}
|
||||
|
||||
#[derive(Debug, Default, Clone, Serialize, Deserialize, JsonSchema, JsonRpcResponse)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct GetPromptResponse {
|
||||
pub name: String,
|
||||
pub content: String,
|
||||
pub default_content: String,
|
||||
pub is_customized: bool,
|
||||
}
|
||||
|
||||
/// Save a custom Goose prompt template.
|
||||
#[derive(Debug, Default, Clone, Serialize, Deserialize, JsonSchema, JsonRpcRequest)]
|
||||
#[request(method = "_goose/unstable/config/prompts/save", response = PromptOperationResponse)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct SavePromptRequest {
|
||||
pub name: String,
|
||||
pub content: String,
|
||||
}
|
||||
|
||||
/// Reset a Goose prompt template to its default content.
|
||||
#[derive(Debug, Default, Clone, Serialize, Deserialize, JsonSchema, JsonRpcRequest)]
|
||||
#[request(method = "_goose/unstable/config/prompts/reset", response = PromptOperationResponse)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct ResetPromptRequest {
|
||||
pub name: String,
|
||||
}
|
||||
|
||||
#[derive(Debug, Default, Clone, Serialize, Deserialize, JsonSchema, JsonRpcResponse)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct PromptOperationResponse {
|
||||
pub message: String,
|
||||
}
|
||||
|
||||
/// Delete a session.
|
||||
#[derive(Debug, Default, Clone, Serialize, Deserialize, JsonSchema, JsonRpcRequest)]
|
||||
#[request(method = "session/delete", response = EmptyResponse)]
|
||||
|
||||
@@ -65,6 +65,26 @@
|
||||
"requestType": "DiagnosticsGetRequest_unstable",
|
||||
"responseType": "DiagnosticsGetResponse_unstable"
|
||||
},
|
||||
{
|
||||
"method": "_goose/unstable/config/prompts/list",
|
||||
"requestType": "ListPromptsRequest_unstable",
|
||||
"responseType": "ListPromptsResponse_unstable"
|
||||
},
|
||||
{
|
||||
"method": "_goose/unstable/config/prompts/get",
|
||||
"requestType": "GetPromptRequest_unstable",
|
||||
"responseType": "GetPromptResponse_unstable"
|
||||
},
|
||||
{
|
||||
"method": "_goose/unstable/config/prompts/save",
|
||||
"requestType": "SavePromptRequest_unstable",
|
||||
"responseType": "PromptOperationResponse_unstable"
|
||||
},
|
||||
{
|
||||
"method": "_goose/unstable/config/prompts/reset",
|
||||
"requestType": "ResetPromptRequest_unstable",
|
||||
"responseType": "PromptOperationResponse_unstable"
|
||||
},
|
||||
{
|
||||
"method": "session/delete",
|
||||
"requestType": "DeleteSessionRequest",
|
||||
|
||||
@@ -1180,6 +1180,141 @@
|
||||
"x-side": "agent",
|
||||
"x-method": "_goose/unstable/diagnostics/get"
|
||||
},
|
||||
"ListPromptsRequest_unstable": {
|
||||
"type": "object",
|
||||
"description": "List all available Goose prompt templates.",
|
||||
"x-side": "agent",
|
||||
"x-method": "_goose/unstable/config/prompts/list"
|
||||
},
|
||||
"ListPromptsResponse_unstable": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"prompts": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/$defs/PromptTemplateEntry"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"prompts"
|
||||
],
|
||||
"x-side": "agent",
|
||||
"x-method": "_goose/unstable/config/prompts/list"
|
||||
},
|
||||
"PromptTemplateEntry": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
"defaultContent": {
|
||||
"type": "string"
|
||||
},
|
||||
"userContent": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"isCustomized": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"name",
|
||||
"description",
|
||||
"defaultContent",
|
||||
"isCustomized"
|
||||
],
|
||||
"description": "Information about a prompt template, including its default content and customization status."
|
||||
},
|
||||
"GetPromptRequest_unstable": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"name"
|
||||
],
|
||||
"description": "Read a Goose prompt template.",
|
||||
"x-side": "agent",
|
||||
"x-method": "_goose/unstable/config/prompts/get"
|
||||
},
|
||||
"GetPromptResponse_unstable": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"content": {
|
||||
"type": "string"
|
||||
},
|
||||
"defaultContent": {
|
||||
"type": "string"
|
||||
},
|
||||
"isCustomized": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"name",
|
||||
"content",
|
||||
"defaultContent",
|
||||
"isCustomized"
|
||||
],
|
||||
"x-side": "agent",
|
||||
"x-method": "_goose/unstable/config/prompts/get"
|
||||
},
|
||||
"SavePromptRequest_unstable": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"content": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"name",
|
||||
"content"
|
||||
],
|
||||
"description": "Save a custom Goose prompt template.",
|
||||
"x-side": "agent",
|
||||
"x-method": "_goose/unstable/config/prompts/save"
|
||||
},
|
||||
"PromptOperationResponse_unstable": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"message": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"message"
|
||||
],
|
||||
"x-side": "agent"
|
||||
},
|
||||
"ResetPromptRequest_unstable": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"name"
|
||||
],
|
||||
"description": "Reset a Goose prompt template to its default content.",
|
||||
"x-side": "agent",
|
||||
"x-method": "_goose/unstable/config/prompts/reset"
|
||||
},
|
||||
"DeleteSessionRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -5406,6 +5541,42 @@
|
||||
"description": "Params for _goose/unstable/diagnostics/get",
|
||||
"title": "DiagnosticsGetRequest_unstable"
|
||||
},
|
||||
{
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/$defs/ListPromptsRequest_unstable"
|
||||
}
|
||||
],
|
||||
"description": "Params for _goose/unstable/config/prompts/list",
|
||||
"title": "ListPromptsRequest_unstable"
|
||||
},
|
||||
{
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/$defs/GetPromptRequest_unstable"
|
||||
}
|
||||
],
|
||||
"description": "Params for _goose/unstable/config/prompts/get",
|
||||
"title": "GetPromptRequest_unstable"
|
||||
},
|
||||
{
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/$defs/SavePromptRequest_unstable"
|
||||
}
|
||||
],
|
||||
"description": "Params for _goose/unstable/config/prompts/save",
|
||||
"title": "SavePromptRequest_unstable"
|
||||
},
|
||||
{
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/$defs/ResetPromptRequest_unstable"
|
||||
}
|
||||
],
|
||||
"description": "Params for _goose/unstable/config/prompts/reset",
|
||||
"title": "ResetPromptRequest_unstable"
|
||||
},
|
||||
{
|
||||
"allOf": [
|
||||
{
|
||||
@@ -6200,6 +6371,30 @@
|
||||
],
|
||||
"title": "DiagnosticsGetResponse_unstable"
|
||||
},
|
||||
{
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/$defs/ListPromptsResponse_unstable"
|
||||
}
|
||||
],
|
||||
"title": "ListPromptsResponse_unstable"
|
||||
},
|
||||
{
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/$defs/GetPromptResponse_unstable"
|
||||
}
|
||||
],
|
||||
"title": "GetPromptResponse_unstable"
|
||||
},
|
||||
{
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/$defs/PromptOperationResponse_unstable"
|
||||
}
|
||||
],
|
||||
"title": "PromptOperationResponse_unstable"
|
||||
},
|
||||
{
|
||||
"allOf": [
|
||||
{
|
||||
|
||||
@@ -97,6 +97,7 @@ mod load_session;
|
||||
mod manage_sessions;
|
||||
mod new_session;
|
||||
mod onboarding;
|
||||
mod prompts;
|
||||
mod providers;
|
||||
mod recipe;
|
||||
mod resources;
|
||||
|
||||
@@ -122,6 +122,38 @@ impl GooseAcpAgent {
|
||||
self.on_get_diagnostics(req).await
|
||||
}
|
||||
|
||||
#[custom_method(ListPromptsRequest)]
|
||||
async fn dispatch_list_prompts(
|
||||
&self,
|
||||
req: ListPromptsRequest,
|
||||
) -> Result<ListPromptsResponse, agent_client_protocol::Error> {
|
||||
self.on_list_prompts(req).await
|
||||
}
|
||||
|
||||
#[custom_method(GetPromptRequest)]
|
||||
async fn dispatch_get_prompt(
|
||||
&self,
|
||||
req: GetPromptRequest,
|
||||
) -> Result<GetPromptResponse, agent_client_protocol::Error> {
|
||||
self.on_get_prompt(req).await
|
||||
}
|
||||
|
||||
#[custom_method(SavePromptRequest)]
|
||||
async fn dispatch_save_prompt(
|
||||
&self,
|
||||
req: SavePromptRequest,
|
||||
) -> Result<PromptOperationResponse, agent_client_protocol::Error> {
|
||||
self.on_save_prompt(req).await
|
||||
}
|
||||
|
||||
#[custom_method(ResetPromptRequest)]
|
||||
async fn dispatch_reset_prompt(
|
||||
&self,
|
||||
req: ResetPromptRequest,
|
||||
) -> Result<PromptOperationResponse, agent_client_protocol::Error> {
|
||||
self.on_reset_prompt(req).await
|
||||
}
|
||||
|
||||
#[custom_method(DeleteSessionRequest)]
|
||||
async fn dispatch_delete_session(
|
||||
&self,
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
use super::*;
|
||||
use crate::prompt_template::{get_template, list_templates, reset_template, save_template};
|
||||
|
||||
impl GooseAcpAgent {
|
||||
pub(super) async fn on_list_prompts(
|
||||
&self,
|
||||
_req: ListPromptsRequest,
|
||||
) -> Result<ListPromptsResponse, agent_client_protocol::Error> {
|
||||
let prompts = list_templates()
|
||||
.into_iter()
|
||||
.map(prompt_template_to_entry)
|
||||
.collect();
|
||||
|
||||
Ok(ListPromptsResponse { prompts })
|
||||
}
|
||||
|
||||
pub(super) async fn on_get_prompt(
|
||||
&self,
|
||||
req: GetPromptRequest,
|
||||
) -> Result<GetPromptResponse, agent_client_protocol::Error> {
|
||||
let template = get_template(&req.name).ok_or_else(|| prompt_not_found(&req.name))?;
|
||||
let content = template
|
||||
.user_content
|
||||
.as_ref()
|
||||
.unwrap_or(&template.default_content)
|
||||
.clone();
|
||||
|
||||
Ok(GetPromptResponse {
|
||||
name: template.name,
|
||||
content,
|
||||
default_content: template.default_content,
|
||||
is_customized: template.is_customized,
|
||||
})
|
||||
}
|
||||
|
||||
pub(super) async fn on_save_prompt(
|
||||
&self,
|
||||
req: SavePromptRequest,
|
||||
) -> Result<PromptOperationResponse, agent_client_protocol::Error> {
|
||||
save_template(&req.name, &req.content).map_err(|err| prompt_io_error(&req.name, err))?;
|
||||
|
||||
Ok(PromptOperationResponse {
|
||||
message: format!("Saved prompt: {}", req.name),
|
||||
})
|
||||
}
|
||||
|
||||
pub(super) async fn on_reset_prompt(
|
||||
&self,
|
||||
req: ResetPromptRequest,
|
||||
) -> Result<PromptOperationResponse, agent_client_protocol::Error> {
|
||||
reset_template(&req.name).map_err(|err| prompt_io_error(&req.name, err))?;
|
||||
|
||||
Ok(PromptOperationResponse {
|
||||
message: format!("Reset prompt to default: {}", req.name),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
fn prompt_template_to_entry(template: crate::prompt_template::Template) -> PromptTemplateEntry {
|
||||
PromptTemplateEntry {
|
||||
name: template.name,
|
||||
description: template.description,
|
||||
default_content: template.default_content,
|
||||
user_content: template.user_content,
|
||||
is_customized: template.is_customized,
|
||||
}
|
||||
}
|
||||
|
||||
fn prompt_not_found(name: &str) -> agent_client_protocol::Error {
|
||||
agent_client_protocol::Error::invalid_params()
|
||||
.data(format!("Prompt template '{name}' not found"))
|
||||
}
|
||||
|
||||
fn prompt_io_error(name: &str, err: std::io::Error) -> agent_client_protocol::Error {
|
||||
if err.kind() == std::io::ErrorKind::NotFound {
|
||||
prompt_not_found(name)
|
||||
} else {
|
||||
agent_client_protocol::Error::internal_error()
|
||||
.data(format!("Failed to update prompt '{name}': {err}"))
|
||||
}
|
||||
}
|
||||
@@ -441,6 +441,100 @@ fn test_custom_get_available_extensions() {
|
||||
});
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[serial]
|
||||
fn test_custom_prompt_methods() {
|
||||
let _guard = env_lock::lock_env([("EXTENSIONS", None::<&str>)]);
|
||||
write_acp_global_config(DEFAULT_ACP_TEST_CONFIG);
|
||||
|
||||
run_test(async move {
|
||||
let openai = OpenAiFixture::new(vec![], Arc::new(EnforceSessionId::default())).await;
|
||||
let conn = AcpServerConnection::new(TestConnectionConfig::default(), openai).await;
|
||||
|
||||
let list_response = send_custom(
|
||||
conn.cx(),
|
||||
"_goose/unstable/config/prompts/list",
|
||||
serde_json::json!({}),
|
||||
)
|
||||
.await
|
||||
.expect("list prompts should succeed");
|
||||
let prompts = list_response["prompts"]
|
||||
.as_array()
|
||||
.expect("prompts should be an array");
|
||||
assert!(
|
||||
prompts.iter().any(|prompt| prompt["name"] == "system.md"),
|
||||
"system.md should be listed"
|
||||
);
|
||||
|
||||
let get_response = send_custom(
|
||||
conn.cx(),
|
||||
"_goose/unstable/config/prompts/get",
|
||||
serde_json::json!({ "name": "system.md" }),
|
||||
)
|
||||
.await
|
||||
.expect("get prompt should succeed");
|
||||
assert_eq!(get_response["name"], "system.md");
|
||||
assert!(get_response["content"]
|
||||
.as_str()
|
||||
.is_some_and(|s| !s.is_empty()));
|
||||
assert_eq!(get_response["isCustomized"], false);
|
||||
|
||||
let content = "custom acp system prompt";
|
||||
let save_response = send_custom(
|
||||
conn.cx(),
|
||||
"_goose/unstable/config/prompts/save",
|
||||
serde_json::json!({ "name": "system.md", "content": content }),
|
||||
)
|
||||
.await
|
||||
.expect("save prompt should succeed");
|
||||
assert_eq!(save_response["message"], "Saved prompt: system.md");
|
||||
|
||||
let get_response = send_custom(
|
||||
conn.cx(),
|
||||
"_goose/unstable/config/prompts/get",
|
||||
serde_json::json!({ "name": "system.md" }),
|
||||
)
|
||||
.await
|
||||
.expect("get saved prompt should succeed");
|
||||
assert_eq!(get_response["content"], content);
|
||||
assert_eq!(get_response["isCustomized"], true);
|
||||
|
||||
let reset_response = send_custom(
|
||||
conn.cx(),
|
||||
"_goose/unstable/config/prompts/reset",
|
||||
serde_json::json!({ "name": "system.md" }),
|
||||
)
|
||||
.await
|
||||
.expect("reset prompt should succeed");
|
||||
assert_eq!(
|
||||
reset_response["message"],
|
||||
"Reset prompt to default: system.md"
|
||||
);
|
||||
|
||||
let get_response = send_custom(
|
||||
conn.cx(),
|
||||
"_goose/unstable/config/prompts/get",
|
||||
serde_json::json!({ "name": "system.md" }),
|
||||
)
|
||||
.await
|
||||
.expect("get reset prompt should succeed");
|
||||
assert_eq!(get_response["isCustomized"], false);
|
||||
assert_ne!(get_response["content"], content);
|
||||
|
||||
let missing = send_custom(
|
||||
conn.cx(),
|
||||
"_goose/unstable/config/prompts/get",
|
||||
serde_json::json!({ "name": "missing.md" }),
|
||||
)
|
||||
.await
|
||||
.expect_err("unknown prompt should fail");
|
||||
assert_eq!(
|
||||
missing.code,
|
||||
agent_client_protocol::ErrorCode::InvalidParams
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[serial]
|
||||
fn test_steer_session_adds_input_to_active_prompt() {
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
import type {
|
||||
GetPromptResponse_unstable,
|
||||
PromptTemplateEntry,
|
||||
} from '@aaif/goose-sdk';
|
||||
import { getAcpClient } from './acpConnection';
|
||||
|
||||
export type PromptTemplate = PromptTemplateEntry;
|
||||
export type PromptContent = GetPromptResponse_unstable;
|
||||
|
||||
export async function acpListPrompts(): Promise<PromptTemplate[]> {
|
||||
const client = await getAcpClient();
|
||||
const response = await client.goose.configPromptsList_unstable({});
|
||||
return response.prompts;
|
||||
}
|
||||
|
||||
export async function acpGetPrompt(name: string): Promise<PromptContent> {
|
||||
const client = await getAcpClient();
|
||||
return client.goose.configPromptsGet_unstable({ name });
|
||||
}
|
||||
|
||||
export async function acpSavePrompt(name: string, content: string): Promise<void> {
|
||||
const client = await getAcpClient();
|
||||
await client.goose.configPromptsSave_unstable({ name, content });
|
||||
}
|
||||
|
||||
export async function acpResetPrompt(name: string): Promise<void> {
|
||||
const client = await getAcpClient();
|
||||
await client.goose.configPromptsReset_unstable({ name });
|
||||
}
|
||||
@@ -1,12 +1,12 @@
|
||||
import { useState, useEffect, useCallback } from 'react';
|
||||
import {
|
||||
getPrompt,
|
||||
getPrompts,
|
||||
PromptContentResponse,
|
||||
Template,
|
||||
resetPrompt,
|
||||
savePrompt,
|
||||
} from '../../api';
|
||||
acpGetPrompt,
|
||||
acpListPrompts,
|
||||
acpResetPrompt,
|
||||
acpSavePrompt,
|
||||
type PromptContent,
|
||||
type PromptTemplate,
|
||||
} from '../../acp/prompts';
|
||||
import { Card, CardContent, CardHeader, CardTitle } from '../ui/card';
|
||||
import { Button } from '../ui/button';
|
||||
import { AlertTriangle, RotateCcw, ArrowLeft } from 'lucide-react';
|
||||
@@ -24,7 +24,8 @@ const i18n = defineMessages({
|
||||
},
|
||||
confirmResetAll: {
|
||||
id: 'promptsSettings.confirmResetAll',
|
||||
defaultMessage: 'Are you sure you want to reset all prompts to their defaults? This cannot be undone.',
|
||||
defaultMessage:
|
||||
'Are you sure you want to reset all prompts to their defaults? This cannot be undone.',
|
||||
},
|
||||
allPromptsReset: {
|
||||
id: 'promptsSettings.allPromptsReset',
|
||||
@@ -44,7 +45,8 @@ const i18n = defineMessages({
|
||||
},
|
||||
confirmResetOne: {
|
||||
id: 'promptsSettings.confirmResetOne',
|
||||
defaultMessage: 'Are you sure you want to reset this prompt to its default? This cannot be undone.',
|
||||
defaultMessage:
|
||||
'Are you sure you want to reset this prompt to its default? This cannot be undone.',
|
||||
},
|
||||
promptResetToDefault: {
|
||||
id: 'promptsSettings.promptResetToDefault',
|
||||
@@ -84,7 +86,8 @@ const i18n = defineMessages({
|
||||
},
|
||||
templateTip: {
|
||||
id: 'promptsSettings.templateTip',
|
||||
defaultMessage: 'Template variables like {extensionsExample} or {forExample} are replaced with actual values at runtime. Be careful not to remove required variables.',
|
||||
defaultMessage:
|
||||
'Template variables like {extensionsExample} or {forExample} are replaced with actual values at runtime. Be careful not to remove required variables.',
|
||||
},
|
||||
editingLabel: {
|
||||
id: 'promptsSettings.editingLabel',
|
||||
@@ -108,7 +111,8 @@ const i18n = defineMessages({
|
||||
},
|
||||
promptEditingDescription: {
|
||||
id: 'promptsSettings.promptEditingDescription',
|
||||
defaultMessage: "Customize the prompts that define goose's behavior in different contexts. These prompts use Jinja2 templating syntax. Be careful when modifying template variables, as incorrect changes can break functionality. Please share any improvements with the community.",
|
||||
defaultMessage:
|
||||
"Customize the prompts that define goose's behavior in different contexts. These prompts use Jinja2 templating syntax. Be careful when modifying template variables, as incorrect changes can break functionality. Please share any improvements with the community.",
|
||||
},
|
||||
resetAll: {
|
||||
id: 'promptsSettings.resetAll',
|
||||
@@ -122,18 +126,16 @@ const i18n = defineMessages({
|
||||
|
||||
export default function PromptsSettingsSection() {
|
||||
const intl = useIntl();
|
||||
const [prompts, setPrompts] = useState<Template[]>([]);
|
||||
const [prompts, setPrompts] = useState<PromptTemplate[]>([]);
|
||||
const [selectedPrompt, setSelectedPrompt] = useState<string | null>(null);
|
||||
const [promptData, setPromptData] = useState<PromptContentResponse | null>(null);
|
||||
const [promptData, setPromptData] = useState<PromptContent | null>(null);
|
||||
const [content, setContent] = useState('');
|
||||
const [hasChanges, setHasChanges] = useState(false);
|
||||
|
||||
const fetchPrompts = useCallback(async () => {
|
||||
try {
|
||||
const response = await getPrompts();
|
||||
if (response.data) {
|
||||
setPrompts(response.data.prompts);
|
||||
}
|
||||
const prompts = await acpListPrompts();
|
||||
setPrompts(prompts);
|
||||
} catch (error) {
|
||||
console.error('Failed to fetch prompts:', error);
|
||||
toast.error(intl.formatMessage(i18n.failedToLoadPrompts));
|
||||
@@ -148,11 +150,9 @@ export default function PromptsSettingsSection() {
|
||||
if (selectedPrompt) {
|
||||
const fetchPrompt = async () => {
|
||||
try {
|
||||
const response = await getPrompt({ path: { name: selectedPrompt } });
|
||||
if (response.data) {
|
||||
setPromptData(response.data);
|
||||
setContent(response.data.content);
|
||||
}
|
||||
const prompt = await acpGetPrompt(selectedPrompt);
|
||||
setPromptData(prompt);
|
||||
setContent(prompt.content);
|
||||
} catch (error) {
|
||||
console.error('Failed to fetch prompt:', error);
|
||||
toast.error(intl.formatMessage(i18n.failedToLoadPrompt));
|
||||
@@ -169,18 +169,14 @@ export default function PromptsSettingsSection() {
|
||||
}, [content, promptData]);
|
||||
|
||||
const handleResetAll = async () => {
|
||||
if (
|
||||
!window.confirm(
|
||||
intl.formatMessage(i18n.confirmResetAll)
|
||||
)
|
||||
) {
|
||||
if (!window.confirm(intl.formatMessage(i18n.confirmResetAll))) {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
const customizedPrompts = prompts.filter((p) => p.is_customized);
|
||||
const customizedPrompts = prompts.filter((p) => p.isCustomized);
|
||||
for (const prompt of customizedPrompts) {
|
||||
await resetPrompt({ path: { name: prompt.name } });
|
||||
await acpResetPrompt(prompt.name);
|
||||
}
|
||||
toast.success(intl.formatMessage(i18n.allPromptsReset));
|
||||
fetchPrompts();
|
||||
@@ -193,12 +189,9 @@ export default function PromptsSettingsSection() {
|
||||
const handleSave = async () => {
|
||||
if (!selectedPrompt) return;
|
||||
try {
|
||||
await savePrompt({
|
||||
path: { name: selectedPrompt },
|
||||
body: { content },
|
||||
});
|
||||
await acpSavePrompt(selectedPrompt, content);
|
||||
toast.success(intl.formatMessage(i18n.promptSaved));
|
||||
setPromptData((prev) => (prev ? { ...prev, content, is_customized: true } : null));
|
||||
setPromptData((prev) => (prev ? { ...prev, content, isCustomized: true } : null));
|
||||
fetchPrompts();
|
||||
} catch (error) {
|
||||
console.error('Failed to save prompt:', error);
|
||||
@@ -208,19 +201,15 @@ export default function PromptsSettingsSection() {
|
||||
|
||||
const handleReset = async () => {
|
||||
if (!selectedPrompt) return;
|
||||
if (
|
||||
!window.confirm(
|
||||
intl.formatMessage(i18n.confirmResetOne)
|
||||
)
|
||||
) {
|
||||
if (!window.confirm(intl.formatMessage(i18n.confirmResetOne))) {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
await resetPrompt({ path: { name: selectedPrompt } });
|
||||
await acpResetPrompt(selectedPrompt);
|
||||
if (promptData) {
|
||||
setContent(promptData.default_content);
|
||||
setPromptData({ ...promptData, content: promptData.default_content, is_customized: false });
|
||||
setContent(promptData.defaultContent);
|
||||
setPromptData({ ...promptData, content: promptData.defaultContent, isCustomized: false });
|
||||
}
|
||||
fetchPrompts();
|
||||
toast.success(intl.formatMessage(i18n.promptResetToDefault));
|
||||
@@ -237,7 +226,7 @@ export default function PromptsSettingsSection() {
|
||||
return;
|
||||
}
|
||||
}
|
||||
setContent(promptData.default_content);
|
||||
setContent(promptData.defaultContent);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -252,7 +241,7 @@ export default function PromptsSettingsSection() {
|
||||
setContent('');
|
||||
};
|
||||
|
||||
const hasCustomizedPrompts = prompts.some((p) => p.is_customized);
|
||||
const hasCustomizedPrompts = prompts.some((p) => p.isCustomized);
|
||||
|
||||
if (selectedPrompt) {
|
||||
return (
|
||||
@@ -270,7 +259,7 @@ export default function PromptsSettingsSection() {
|
||||
{intl.formatMessage(i18n.backToList)}
|
||||
</Button>
|
||||
<div className="flex items-center gap-2">
|
||||
{promptData?.is_customized && (
|
||||
{promptData?.isCustomized && (
|
||||
<Button
|
||||
variant="outline"
|
||||
size="sm"
|
||||
@@ -287,8 +276,10 @@ export default function PromptsSettingsSection() {
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex items-center gap-2">
|
||||
<CardTitle>{intl.formatMessage(i18n.editPromptTitle, { name: selectedPrompt })}</CardTitle>
|
||||
{promptData?.is_customized && (
|
||||
<CardTitle>
|
||||
{intl.formatMessage(i18n.editPromptTitle, { name: selectedPrompt })}
|
||||
</CardTitle>
|
||||
{promptData?.isCustomized && (
|
||||
<span className="px-2 py-0.5 text-xs rounded-full bg-blue-500/20 text-blue-600 dark:text-blue-400">
|
||||
{intl.formatMessage(i18n.customized)}
|
||||
</span>
|
||||
@@ -307,8 +298,10 @@ export default function PromptsSettingsSection() {
|
||||
|
||||
<div className="space-y-2 flex-1 flex flex-col min-h-0">
|
||||
<div className="flex items-center justify-between">
|
||||
<label className="text-sm font-medium">{intl.formatMessage(i18n.editingLabel, { name: selectedPrompt })}</label>
|
||||
{promptData?.is_customized && content !== promptData.default_content && (
|
||||
<label className="text-sm font-medium">
|
||||
{intl.formatMessage(i18n.editingLabel, { name: selectedPrompt })}
|
||||
</label>
|
||||
{promptData?.isCustomized && content !== promptData.defaultContent && (
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
@@ -346,7 +339,9 @@ export default function PromptsSettingsSection() {
|
||||
<div className="flex items-start gap-3">
|
||||
<AlertTriangle className="h-5 w-5 text-yellow-500 flex-shrink-0 mt-1" />
|
||||
<div className="flex-1">
|
||||
<CardTitle className="text-yellow-600 dark:text-yellow-400">{intl.formatMessage(i18n.promptEditingTitle)}</CardTitle>
|
||||
<CardTitle className="text-yellow-600 dark:text-yellow-400">
|
||||
{intl.formatMessage(i18n.promptEditingTitle)}
|
||||
</CardTitle>
|
||||
<p className="text-sm text-text-secondary mt-2">
|
||||
{intl.formatMessage(i18n.promptEditingDescription)}
|
||||
</p>
|
||||
@@ -374,7 +369,7 @@ export default function PromptsSettingsSection() {
|
||||
<div className="flex-1 min-w-0">
|
||||
<div className="flex items-center gap-2">
|
||||
<h4 className="font-medium text-text-primary truncate">{prompt.name}</h4>
|
||||
{prompt.is_customized && (
|
||||
{prompt.isCustomized && (
|
||||
<span className="px-2 py-0.5 text-xs rounded-full bg-blue-500/20 text-blue-600 dark:text-blue-400">
|
||||
{intl.formatMessage(i18n.customized)}
|
||||
</span>
|
||||
|
||||
@@ -65,6 +65,8 @@ import type {
|
||||
GetAvailableExtensionsResponse_unstable,
|
||||
GetConfigExtensionsRequest_unstable,
|
||||
GetConfigExtensionsResponse_unstable,
|
||||
GetPromptRequest_unstable,
|
||||
GetPromptResponse_unstable,
|
||||
GetSessionExtensionsRequest_unstable,
|
||||
GetSessionExtensionsResponse_unstable,
|
||||
GetSessionInfoRequest_unstable,
|
||||
@@ -84,6 +86,8 @@ import type {
|
||||
KillRunningJobResponse_unstable,
|
||||
ListAgentMentionsRequest_unstable,
|
||||
ListAgentMentionsResponse_unstable,
|
||||
ListPromptsRequest_unstable,
|
||||
ListPromptsResponse_unstable,
|
||||
ListProvidersRequest_unstable,
|
||||
ListProvidersResponse_unstable,
|
||||
ListRecipesRequest_unstable,
|
||||
@@ -107,6 +111,7 @@ import type {
|
||||
PreferencesReadResponse_unstable,
|
||||
PreferencesRemoveRequest_unstable,
|
||||
PreferencesSaveRequest_unstable,
|
||||
PromptOperationResponse_unstable,
|
||||
ProviderCatalogListRequest_unstable,
|
||||
ProviderCatalogListResponse_unstable,
|
||||
ProviderCatalogTemplateRequest_unstable,
|
||||
@@ -134,8 +139,10 @@ import type {
|
||||
RemoveSessionExtensionRequest_unstable,
|
||||
RenameSessionRequest_unstable,
|
||||
RequestRecipeParams_unstable,
|
||||
ResetPromptRequest_unstable,
|
||||
RunScheduleNowRequest_unstable,
|
||||
RunScheduleNowResponse_unstable,
|
||||
SavePromptRequest_unstable,
|
||||
SaveRecipeRequest_unstable,
|
||||
SaveRecipeResponse_unstable,
|
||||
ScanRecipeRequest_unstable,
|
||||
@@ -182,6 +189,7 @@ import {
|
||||
zExportSourceResponse_unstable,
|
||||
zGetAvailableExtensionsResponse_unstable,
|
||||
zGetConfigExtensionsResponse_unstable,
|
||||
zGetPromptResponse_unstable,
|
||||
zGetSessionExtensionsResponse_unstable,
|
||||
zGetSessionInfoResponse_unstable,
|
||||
zGetToolsResponse_unstable,
|
||||
@@ -192,6 +200,7 @@ import {
|
||||
zInspectRunningJobResponse_unstable,
|
||||
zKillRunningJobResponse_unstable,
|
||||
zListAgentMentionsResponse_unstable,
|
||||
zListPromptsResponse_unstable,
|
||||
zListProvidersResponse_unstable,
|
||||
zListRecipesResponse_unstable,
|
||||
zListScheduleSessionsResponse_unstable,
|
||||
@@ -202,6 +211,7 @@ import {
|
||||
zOnboardingImportScanResponse_unstable,
|
||||
zParseRecipeResponse_unstable,
|
||||
zPreferencesReadResponse_unstable,
|
||||
zPromptOperationResponse_unstable,
|
||||
zProviderCatalogListResponse_unstable,
|
||||
zProviderCatalogTemplateResponse_unstable,
|
||||
zProviderConfigChangeResponse_unstable,
|
||||
@@ -354,6 +364,52 @@ export class GooseExtClient {
|
||||
) as DiagnosticsGetResponse_unstable;
|
||||
}
|
||||
|
||||
async configPromptsList_unstable(
|
||||
params: ListPromptsRequest_unstable,
|
||||
): Promise<ListPromptsResponse_unstable> {
|
||||
const raw = await this.conn.extMethod(
|
||||
"_goose/unstable/config/prompts/list",
|
||||
params,
|
||||
);
|
||||
return zListPromptsResponse_unstable.parse(
|
||||
raw,
|
||||
) as ListPromptsResponse_unstable;
|
||||
}
|
||||
|
||||
async configPromptsGet_unstable(
|
||||
params: GetPromptRequest_unstable,
|
||||
): Promise<GetPromptResponse_unstable> {
|
||||
const raw = await this.conn.extMethod(
|
||||
"_goose/unstable/config/prompts/get",
|
||||
params,
|
||||
);
|
||||
return zGetPromptResponse_unstable.parse(raw) as GetPromptResponse_unstable;
|
||||
}
|
||||
|
||||
async configPromptsSave_unstable(
|
||||
params: SavePromptRequest_unstable,
|
||||
): Promise<PromptOperationResponse_unstable> {
|
||||
const raw = await this.conn.extMethod(
|
||||
"_goose/unstable/config/prompts/save",
|
||||
params,
|
||||
);
|
||||
return zPromptOperationResponse_unstable.parse(
|
||||
raw,
|
||||
) as PromptOperationResponse_unstable;
|
||||
}
|
||||
|
||||
async configPromptsReset_unstable(
|
||||
params: ResetPromptRequest_unstable,
|
||||
): Promise<PromptOperationResponse_unstable> {
|
||||
const raw = await this.conn.extMethod(
|
||||
"_goose/unstable/config/prompts/reset",
|
||||
params,
|
||||
);
|
||||
return zPromptOperationResponse_unstable.parse(
|
||||
raw,
|
||||
) as PromptOperationResponse_unstable;
|
||||
}
|
||||
|
||||
async sessionDelete(params: DeleteSessionRequest): Promise<void> {
|
||||
await this.conn.extMethod("session/delete", params);
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -562,6 +562,61 @@ export type DiagnosticsGetResponse_unstable = {
|
||||
report: unknown;
|
||||
};
|
||||
|
||||
/**
|
||||
* List all available Goose prompt templates.
|
||||
*/
|
||||
export type ListPromptsRequest_unstable = {
|
||||
[key: string]: unknown;
|
||||
};
|
||||
|
||||
export type ListPromptsResponse_unstable = {
|
||||
prompts: Array<PromptTemplateEntry>;
|
||||
};
|
||||
|
||||
/**
|
||||
* Information about a prompt template, including its default content and customization status.
|
||||
*/
|
||||
export type PromptTemplateEntry = {
|
||||
name: string;
|
||||
description: string;
|
||||
defaultContent: string;
|
||||
userContent?: string | null;
|
||||
isCustomized: boolean;
|
||||
};
|
||||
|
||||
/**
|
||||
* Read a Goose prompt template.
|
||||
*/
|
||||
export type GetPromptRequest_unstable = {
|
||||
name: string;
|
||||
};
|
||||
|
||||
export type GetPromptResponse_unstable = {
|
||||
name: string;
|
||||
content: string;
|
||||
defaultContent: string;
|
||||
isCustomized: boolean;
|
||||
};
|
||||
|
||||
/**
|
||||
* Save a custom Goose prompt template.
|
||||
*/
|
||||
export type SavePromptRequest_unstable = {
|
||||
name: string;
|
||||
content: string;
|
||||
};
|
||||
|
||||
export type PromptOperationResponse_unstable = {
|
||||
message: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* Reset a Goose prompt template to its default content.
|
||||
*/
|
||||
export type ResetPromptRequest_unstable = {
|
||||
name: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* Delete a session.
|
||||
*/
|
||||
@@ -2071,14 +2126,14 @@ export type RecipeParamsAction = 'submit' | 'cancel';
|
||||
export type ExtRequest = {
|
||||
id: string;
|
||||
method: string;
|
||||
params?: AddSessionExtensionRequest_unstable | RemoveSessionExtensionRequest_unstable | GetToolsRequest_unstable | SetToolPermissionsRequest_unstable | GooseToolCallRequest_unstable | ReadResourceRequest_unstable | AppsListRequest_unstable | AppsExportRequest_unstable | AppsImportRequest_unstable | UpdateWorkingDirRequest_unstable | SetSessionSystemPromptRequest_unstable | SteerSessionRequest_unstable | DiagnosticsGetRequest_unstable | DeleteSessionRequest | GetConfigExtensionsRequest_unstable | GetAvailableExtensionsRequest_unstable | AddConfigExtensionRequest_unstable | RemoveConfigExtensionRequest_unstable | SetConfigExtensionEnabledRequest_unstable | GetSessionExtensionsRequest_unstable | ListProvidersRequest_unstable | ProviderSupportedModelsListRequest_unstable | ProviderCatalogListRequest_unstable | ProviderSetupCatalogListRequest_unstable | ProviderCatalogTemplateRequest_unstable | CustomProviderCreateRequest_unstable | CustomProviderReadRequest_unstable | CustomProviderUpdateRequest_unstable | CustomProviderDeleteRequest_unstable | RefreshProviderInventoryRequest_unstable | ProviderConfigReadRequest_unstable | ProviderConfigStatusRequest_unstable | ProviderConfigSaveRequest_unstable | ProviderConfigDeleteRequest_unstable | ProviderConfigAuthenticateRequest_unstable | PreferencesReadRequest_unstable | PreferencesSaveRequest_unstable | PreferencesRemoveRequest_unstable | DefaultsReadRequest_unstable | DefaultsSaveRequest_unstable | OnboardingImportScanRequest_unstable | OnboardingImportApplyRequest_unstable | ExportSessionRequest_unstable | ImportSessionRequest_unstable | ShareSessionNostrRequest_unstable | EncodeRecipeRequest_unstable | DecodeRecipeRequest_unstable | ScanRecipeRequest_unstable | ListRecipesRequest_unstable | DeleteRecipeRequest_unstable | ScheduleRecipeRequest_unstable | SetRecipeSlashCommandRequest_unstable | SaveRecipeRequest_unstable | ParseRecipeRequest_unstable | RecipeToYamlRequest_unstable | ListSchedulesRequest_unstable | ListScheduleSessionsRequest_unstable | CreateScheduleRequest_unstable | DeleteScheduleRequest_unstable | PauseScheduleRequest_unstable | UnpauseScheduleRequest_unstable | UpdateScheduleRequest_unstable | RunScheduleNowRequest_unstable | KillRunningJobRequest_unstable | InspectRunningJobRequest_unstable | GetSessionInfoRequest_unstable | TruncateSessionConversationRequest_unstable | UpdateSessionProjectRequest_unstable | RenameSessionRequest_unstable | ArchiveSessionRequest_unstable | UnarchiveSessionRequest_unstable | CreateSourceRequest_unstable | ListSourcesRequest_unstable | ListAgentMentionsRequest_unstable | ListSlashCommandsRequest_unstable | UpdateSourceRequest_unstable | DeleteSourceRequest_unstable | ExportSourceRequest_unstable | ImportSourcesRequest_unstable | DictationTranscribeRequest_unstable | DictationConfigRequest_unstable | DictationSecretSaveRequest_unstable | DictationSecretDeleteRequest_unstable | DictationModelsListRequest_unstable | DictationModelDownloadRequest_unstable | DictationModelDownloadProgressRequest_unstable | DictationModelCancelRequest_unstable | DictationModelDeleteRequest_unstable | DictationModelSelectRequest_unstable | {
|
||||
params?: AddSessionExtensionRequest_unstable | RemoveSessionExtensionRequest_unstable | GetToolsRequest_unstable | SetToolPermissionsRequest_unstable | GooseToolCallRequest_unstable | ReadResourceRequest_unstable | AppsListRequest_unstable | AppsExportRequest_unstable | AppsImportRequest_unstable | UpdateWorkingDirRequest_unstable | SetSessionSystemPromptRequest_unstable | SteerSessionRequest_unstable | DiagnosticsGetRequest_unstable | ListPromptsRequest_unstable | GetPromptRequest_unstable | SavePromptRequest_unstable | ResetPromptRequest_unstable | DeleteSessionRequest | GetConfigExtensionsRequest_unstable | GetAvailableExtensionsRequest_unstable | AddConfigExtensionRequest_unstable | RemoveConfigExtensionRequest_unstable | SetConfigExtensionEnabledRequest_unstable | GetSessionExtensionsRequest_unstable | ListProvidersRequest_unstable | ProviderSupportedModelsListRequest_unstable | ProviderCatalogListRequest_unstable | ProviderSetupCatalogListRequest_unstable | ProviderCatalogTemplateRequest_unstable | CustomProviderCreateRequest_unstable | CustomProviderReadRequest_unstable | CustomProviderUpdateRequest_unstable | CustomProviderDeleteRequest_unstable | RefreshProviderInventoryRequest_unstable | ProviderConfigReadRequest_unstable | ProviderConfigStatusRequest_unstable | ProviderConfigSaveRequest_unstable | ProviderConfigDeleteRequest_unstable | ProviderConfigAuthenticateRequest_unstable | PreferencesReadRequest_unstable | PreferencesSaveRequest_unstable | PreferencesRemoveRequest_unstable | DefaultsReadRequest_unstable | DefaultsSaveRequest_unstable | OnboardingImportScanRequest_unstable | OnboardingImportApplyRequest_unstable | ExportSessionRequest_unstable | ImportSessionRequest_unstable | ShareSessionNostrRequest_unstable | EncodeRecipeRequest_unstable | DecodeRecipeRequest_unstable | ScanRecipeRequest_unstable | ListRecipesRequest_unstable | DeleteRecipeRequest_unstable | ScheduleRecipeRequest_unstable | SetRecipeSlashCommandRequest_unstable | SaveRecipeRequest_unstable | ParseRecipeRequest_unstable | RecipeToYamlRequest_unstable | ListSchedulesRequest_unstable | ListScheduleSessionsRequest_unstable | CreateScheduleRequest_unstable | DeleteScheduleRequest_unstable | PauseScheduleRequest_unstable | UnpauseScheduleRequest_unstable | UpdateScheduleRequest_unstable | RunScheduleNowRequest_unstable | KillRunningJobRequest_unstable | InspectRunningJobRequest_unstable | GetSessionInfoRequest_unstable | TruncateSessionConversationRequest_unstable | UpdateSessionProjectRequest_unstable | RenameSessionRequest_unstable | ArchiveSessionRequest_unstable | UnarchiveSessionRequest_unstable | CreateSourceRequest_unstable | ListSourcesRequest_unstable | ListAgentMentionsRequest_unstable | ListSlashCommandsRequest_unstable | UpdateSourceRequest_unstable | DeleteSourceRequest_unstable | ExportSourceRequest_unstable | ImportSourcesRequest_unstable | DictationTranscribeRequest_unstable | DictationConfigRequest_unstable | DictationSecretSaveRequest_unstable | DictationSecretDeleteRequest_unstable | DictationModelsListRequest_unstable | DictationModelDownloadRequest_unstable | DictationModelDownloadProgressRequest_unstable | DictationModelCancelRequest_unstable | DictationModelDeleteRequest_unstable | DictationModelSelectRequest_unstable | {
|
||||
[key: string]: unknown;
|
||||
} | null;
|
||||
};
|
||||
|
||||
export type ExtResponse = {
|
||||
id: string;
|
||||
result?: EmptyResponse | GetToolsResponse_unstable | SetToolPermissionsResponse_unstable | GooseToolCallResponse_unstable | ReadResourceResponse_unstable | AppsListResponse_unstable | AppsExportResponse_unstable | AppsImportResponse_unstable | SteerSessionResponse_unstable | DiagnosticsGetResponse_unstable | GetConfigExtensionsResponse_unstable | GetAvailableExtensionsResponse_unstable | GetSessionExtensionsResponse_unstable | ListProvidersResponse_unstable | ProviderSupportedModelsListResponse_unstable | ProviderCatalogListResponse_unstable | ProviderSetupCatalogListResponse_unstable | ProviderCatalogTemplateResponse_unstable | CustomProviderCreateResponse_unstable | CustomProviderReadResponse_unstable | CustomProviderUpdateResponse_unstable | CustomProviderDeleteResponse_unstable | RefreshProviderInventoryResponse_unstable | ProviderConfigReadResponse_unstable | ProviderConfigStatusResponse_unstable | ProviderConfigChangeResponse_unstable | PreferencesReadResponse_unstable | DefaultsReadResponse_unstable | OnboardingImportScanResponse_unstable | OnboardingImportApplyResponse_unstable | ExportSessionResponse_unstable | ImportSessionResponse_unstable | ShareSessionNostrResponse_unstable | EncodeRecipeResponse_unstable | DecodeRecipeResponse_unstable | ScanRecipeResponse_unstable | ListRecipesResponse_unstable | SaveRecipeResponse_unstable | ParseRecipeResponse_unstable | RecipeToYamlResponse_unstable | ListSchedulesResponse_unstable | ListScheduleSessionsResponse_unstable | CreateScheduleResponse_unstable | UpdateScheduleResponse_unstable | RunScheduleNowResponse_unstable | KillRunningJobResponse_unstable | InspectRunningJobResponse_unstable | GetSessionInfoResponse_unstable | CreateSourceResponse_unstable | ListSourcesResponse_unstable | ListAgentMentionsResponse_unstable | ListSlashCommandsResponse_unstable | UpdateSourceResponse_unstable | ExportSourceResponse_unstable | ImportSourcesResponse_unstable | DictationTranscribeResponse_unstable | DictationConfigResponse_unstable | DictationModelsListResponse_unstable | DictationModelDownloadProgressResponse_unstable | unknown;
|
||||
result?: EmptyResponse | GetToolsResponse_unstable | SetToolPermissionsResponse_unstable | GooseToolCallResponse_unstable | ReadResourceResponse_unstable | AppsListResponse_unstable | AppsExportResponse_unstable | AppsImportResponse_unstable | SteerSessionResponse_unstable | DiagnosticsGetResponse_unstable | ListPromptsResponse_unstable | GetPromptResponse_unstable | PromptOperationResponse_unstable | GetConfigExtensionsResponse_unstable | GetAvailableExtensionsResponse_unstable | GetSessionExtensionsResponse_unstable | ListProvidersResponse_unstable | ProviderSupportedModelsListResponse_unstable | ProviderCatalogListResponse_unstable | ProviderSetupCatalogListResponse_unstable | ProviderCatalogTemplateResponse_unstable | CustomProviderCreateResponse_unstable | CustomProviderReadResponse_unstable | CustomProviderUpdateResponse_unstable | CustomProviderDeleteResponse_unstable | RefreshProviderInventoryResponse_unstable | ProviderConfigReadResponse_unstable | ProviderConfigStatusResponse_unstable | ProviderConfigChangeResponse_unstable | PreferencesReadResponse_unstable | DefaultsReadResponse_unstable | OnboardingImportScanResponse_unstable | OnboardingImportApplyResponse_unstable | ExportSessionResponse_unstable | ImportSessionResponse_unstable | ShareSessionNostrResponse_unstable | EncodeRecipeResponse_unstable | DecodeRecipeResponse_unstable | ScanRecipeResponse_unstable | ListRecipesResponse_unstable | SaveRecipeResponse_unstable | ParseRecipeResponse_unstable | RecipeToYamlResponse_unstable | ListSchedulesResponse_unstable | ListScheduleSessionsResponse_unstable | CreateScheduleResponse_unstable | UpdateScheduleResponse_unstable | RunScheduleNowResponse_unstable | KillRunningJobResponse_unstable | InspectRunningJobResponse_unstable | GetSessionInfoResponse_unstable | CreateSourceResponse_unstable | ListSourcesResponse_unstable | ListAgentMentionsResponse_unstable | ListSlashCommandsResponse_unstable | UpdateSourceResponse_unstable | ExportSourceResponse_unstable | ImportSourcesResponse_unstable | DictationTranscribeResponse_unstable | DictationConfigResponse_unstable | DictationModelsListResponse_unstable | DictationModelDownloadProgressResponse_unstable | unknown;
|
||||
} | {
|
||||
error: {
|
||||
code: number;
|
||||
|
||||
+219
-627
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user