Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions internal/shared/types/app_manifest.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ type DisplayInformation struct {

type AppFeatures struct {
AppHome ManifestAppHome `json:"app_home,omitempty" yaml:"app_home,flow,omitempty"`
AgentView *AgentView `json:"agent_view,omitempty" yaml:"agent_view,omitempty"`
AssistantView *AssistantView `json:"assistant_view,omitempty" yaml:"assistant_view,omitempty"`
BotUser BotUser `json:"bot_user,omitempty" yaml:"bot_user,flow,omitempty"`
WorkflowSteps []WorkflowStep `json:"workflow_steps,omitempty" yaml:"workflow_steps,flow,omitempty"`
Expand All @@ -95,6 +96,17 @@ type SuggestedPrompts struct {
Message string `json:"message,omitempty" yaml:"message,omitempty"`
}

type AgentView struct {
AgentDescription string `json:"agent_description,omitempty" yaml:"agent_description,omitempty"`
SuggestedPrompts []SuggestedPrompts `json:"suggested_prompts,omitempty" yaml:"suggested_prompts,flow,omitempty"`
Actions []AgentViewAction `json:"actions,omitempty" yaml:"actions,flow,omitempty"`
}

type AgentViewAction struct {
Name string `json:"name,omitempty" yaml:"name,omitempty"`
Description string `json:"description,omitempty" yaml:"description,omitempty"`
}

type OAuthConfig struct {
RedirectURLs []string `json:"redirect_urls,omitempty" yaml:"redirect_urls,flow,omitempty"`
Scopes *ManifestScopes `json:"scopes,omitempty" yaml:"scopes,flow,omitempty"`
Expand Down
34 changes: 34 additions & 0 deletions internal/shared/types/app_manifest_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,40 @@ func Test_AppManifest_AppFeatures(t *testing.T) {
},
want: `{"app_home":{},"assistant_view":{"assistant_description":"magic","suggested_prompts":[{"title":"visit the beach","message":"what is glass"}]},"bot_user":{"display_name":"einstein"}}`,
},
"includes agent view when provided": {
features: AppFeatures{
AgentView: &AgentView{
AgentDescription: "summarizes threads",
SuggestedPrompts: []SuggestedPrompts{
{
Title: "summarize this thread",
Message: "please summarize the conversation",
},
},
Actions: []AgentViewAction{
{
Name: "open_settings",
Description: "Open the agent settings panel.",
},
},
},
BotUser: BotUser{
DisplayName: "agent_smith",
},
},
want: `{"app_home":{},"agent_view":{"agent_description":"summarizes threads","suggested_prompts":[{"title":"summarize this thread","message":"please summarize the conversation"}],"actions":[{"name":"open_settings","description":"Open the agent settings panel."}]},"bot_user":{"display_name":"agent_smith"}}`,
},
"omits agent view fields when empty": {
features: AppFeatures{
AgentView: &AgentView{
AgentDescription: "minimal",
},
BotUser: BotUser{
DisplayName: "agent_smith",
},
},
want: `{"app_home":{},"agent_view":{"agent_description":"minimal"},"bot_user":{"display_name":"agent_smith"}}`,
},
"includes search when provided": {
features: AppFeatures{
BotUser: BotUser{
Expand Down
Loading