-
Notifications
You must be signed in to change notification settings - Fork 54
feat(bluebird): mirror Code view's top nav in the Website space #3028
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| /** | ||
| * The agents surface (scouts + the agent-applications platform) is mounted under | ||
| * both `/code/agents/*` (the Code view) and `/website/agents/*` (the Channels / | ||
| * Bluebird view), sharing the same view components. Internal navigation resolves | ||
| * its routes through the per-space map below so every `<Link>` / `navigate` stays | ||
| * in the space the user is currently in instead of jumping back to `/code`. | ||
| */ | ||
| export type AgentsSpace = "code" | "website"; | ||
|
|
||
| /** Which space a pathname belongs to. Defaults to `code` off the website tree. */ | ||
| export function agentsSpaceFromPath(pathname: string): AgentsSpace { | ||
| return pathname.startsWith("/website") ? "website" : "code"; | ||
| } | ||
|
|
||
| /** | ||
| * Every agents route, keyed by space. `$idOrSlug` / `$skillName` / `$sessionId` | ||
| * params are filled in by the call site via TanStack's typed `params`. | ||
| */ | ||
| export const AGENTS_ROUTE = { | ||
| code: { | ||
| root: "/code/agents", | ||
| scouts: "/code/agents/scouts", | ||
| scoutDetail: "/code/agents/scouts/$skillName", | ||
| scratchpad: "/code/agents/scouts/scratchpad", | ||
| applications: "/code/agents/applications", | ||
| fleetApprovals: "/code/agents/applications/approvals", | ||
| application: "/code/agents/applications/$idOrSlug", | ||
| configuration: "/code/agents/applications/$idOrSlug/configuration", | ||
| sessions: "/code/agents/applications/$idOrSlug/sessions", | ||
| sessionDetail: "/code/agents/applications/$idOrSlug/sessions/$sessionId", | ||
| users: "/code/agents/applications/$idOrSlug/users", | ||
| memory: "/code/agents/applications/$idOrSlug/memory", | ||
| approvals: "/code/agents/applications/$idOrSlug/approvals", | ||
| observability: "/code/agents/applications/$idOrSlug/observability", | ||
| chat: "/code/agents/applications/$idOrSlug/chat", | ||
| }, | ||
| website: { | ||
| root: "/website/agents", | ||
| scouts: "/website/agents/scouts", | ||
| scoutDetail: "/website/agents/scouts/$skillName", | ||
| scratchpad: "/website/agents/scouts/scratchpad", | ||
| applications: "/website/agents/applications", | ||
| fleetApprovals: "/website/agents/applications/approvals", | ||
| application: "/website/agents/applications/$idOrSlug", | ||
| configuration: "/website/agents/applications/$idOrSlug/configuration", | ||
| sessions: "/website/agents/applications/$idOrSlug/sessions", | ||
| sessionDetail: "/website/agents/applications/$idOrSlug/sessions/$sessionId", | ||
| users: "/website/agents/applications/$idOrSlug/users", | ||
| memory: "/website/agents/applications/$idOrSlug/memory", | ||
| approvals: "/website/agents/applications/$idOrSlug/approvals", | ||
| observability: "/website/agents/applications/$idOrSlug/observability", | ||
| chat: "/website/agents/applications/$idOrSlug/chat", | ||
| }, | ||
| } as const satisfies Record<AgentsSpace, Record<string, string>>; | ||
|
|
||
| /** The set of route keys available per space. */ | ||
| export type AgentsRouteKey = keyof (typeof AGENTS_ROUTE)["code"]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.