feat: add title field for data types (#410)
* feat(model): add title field to various structs * fix(test): fix test json schema * fix(model): allow boxed type in `ts_union` macro
This commit is contained in:
parent
fdd6bc0565
commit
1b70f5b032
1 changed files with 219 additions and 73 deletions
|
|
@ -14,6 +14,8 @@ use super::{
|
|||
pub struct Prompt {
|
||||
/// The name of the prompt
|
||||
pub name: String,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub title: Option<String>,
|
||||
/// Optional description of what the prompt does
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub description: Option<String>,
|
||||
|
|
@ -35,6 +37,7 @@ impl Prompt {
|
|||
{
|
||||
Prompt {
|
||||
name: name.into(),
|
||||
title: None,
|
||||
description: description.map(Into::into),
|
||||
arguments,
|
||||
}
|
||||
|
|
@ -47,6 +50,9 @@ impl Prompt {
|
|||
pub struct PromptArgument {
|
||||
/// The name of the argument
|
||||
pub name: String,
|
||||
/// A human-readable title for the argument
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub title: Option<String>,
|
||||
/// A description of what the argument is used for
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub description: Option<String>,
|
||||
|
|
|
|||
Loading…
Reference in a new issue