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
38 changes: 22 additions & 16 deletions components/backend/handlers/sessions.go
Original file line number Diff line number Diff line change
Expand Up @@ -1839,13 +1839,15 @@ func fetchGitHubDirectoryListing(ctx context.Context, owner, repo, ref, path, to

// OOTBWorkflow represents an out-of-the-box workflow
type OOTBWorkflow struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
GitURL string `json:"gitUrl"`
Branch string `json:"branch"`
Path string `json:"path,omitempty"`
Enabled bool `json:"enabled"`
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
GitURL string `json:"gitUrl"`
Branch string `json:"branch"`
Path string `json:"path,omitempty"`
Enabled bool `json:"enabled"`
StartupPrompt string `json:"startupPrompt,omitempty"`
Greeting string `json:"greeting,omitempty"`
}

// ListOOTBWorkflows returns the list of out-of-the-box workflows dynamically discovered from GitHub
Expand Down Expand Up @@ -1954,8 +1956,10 @@ func ListOOTBWorkflows(c *gin.Context) {
ambientData, err := fetchGitHubFileContent(c.Request.Context(), owner, repoName, ootbBranch, ambientPath, token)

var ambientConfig struct {
Name string `json:"name"`
Description string `json:"description"`
Name string `json:"name"`
Description string `json:"description"`
StartupPrompt string `json:"startupPrompt"`
Greeting string `json:"greeting"`
}
if err == nil {
// Parse ambient.json if found
Expand All @@ -1972,13 +1976,15 @@ func ListOOTBWorkflows(c *gin.Context) {
}

workflows = append(workflows, OOTBWorkflow{
ID: entryName,
Name: workflowName,
Description: ambientConfig.Description,
GitURL: ootbRepo,
Branch: ootbBranch,
Path: fmt.Sprintf("%s/%s", ootbWorkflowsPath, entryName),
Enabled: true,
ID: entryName,
Name: workflowName,
Description: ambientConfig.Description,
GitURL: ootbRepo,
Branch: ootbBranch,
Path: fmt.Sprintf("%s/%s", ootbWorkflowsPath, entryName),
Enabled: true,
StartupPrompt: ambientConfig.StartupPrompt,
Greeting: ambientConfig.Greeting,
})
}

Expand Down
Loading