Pick any line to see why it is the way it is: the commit, the pull request and issue it came from, and what the agent was thinking.
| The Marketplace adds what g1t doesn't do and connects what you already use: extensions (Mail, Support, CRM, Recruiting, On-call, and bridges to a helpdesk, CRM or ERP you run, all Soon), starter kits, and integrations connected by the workspace or by each person; agents aren't installed there. Agent templates live in Agents, as starting points you configure, at Agents → Templates, and the Marketplace's old agent addresses lead there. The marketplace and agents guides say how. | 1 | /** |
| 2 | * What the agent template pages read: the templates and the workspace's | |
| 3 | * agents, to say which started from each. Each part that does not answer | |
| 4 | * comes back null, and the page says so. | |
| 5 | */ | |
| 6 | import type { AgentTemplate, User } from "@g1t/contracts"; | |
| 7 | ||
| 8 | import type { StartedAgent } from "./agent-templates"; | |
| 9 | import { workspaceAgents } from "./services.server"; | |
| 10 | ||
| 11 | export async function loadTemplates(slug: string, viewer: User): Promise<{ templates: AgentTemplate[] | null; agents: StartedAgent[] | null }> { | |
| 12 | const [templates, agents] = await Promise.all([ | |
| 13 | workspaceAgents.templates().catch(() => null), | |
| 14 | workspaceAgents | |
| 15 | .list(slug, viewer) | |
| 16 | .then((result) => (result.ok ? result.value.map(({ id, handle, display_name, template, archived_at }) => ({ id, handle, display_name, template, archived_at })) : null)) | |
| 17 | .catch(() => null), | |
| 18 | ]); | |
| 19 | return { templates, agents }; | |
| 20 | } |