feat: add remote-first education work lake
This commit is contained in:
parent
ac9d051778
commit
333cd222c5
43 changed files with 923 additions and 74 deletions
|
|
@ -40,37 +40,40 @@ export const AI_AGENT_DEFINITIONS: readonly AiAgentDefinition[] = [
|
|||
shortLabel: 'Copilot',
|
||||
installUrl: 'https://docs.github.com/en/copilot/how-tos/copilot-cli/set-up-copilot-cli/install-copilot-cli',
|
||||
},
|
||||
{
|
||||
] as const
|
||||
|
||||
const LEGACY_AI_AGENT_DEFINITIONS: Partial<Record<AiAgentId, AiAgentDefinition>> = {
|
||||
opencode: {
|
||||
id: 'opencode',
|
||||
label: 'OpenCode',
|
||||
shortLabel: 'OpenCode',
|
||||
installUrl: 'https://opencode.ai/docs/',
|
||||
},
|
||||
{
|
||||
pi: {
|
||||
id: 'pi',
|
||||
label: 'Pi',
|
||||
shortLabel: 'Pi',
|
||||
installUrl: 'https://pi.dev',
|
||||
},
|
||||
{
|
||||
antigravity: {
|
||||
id: 'antigravity',
|
||||
label: 'Antigravity CLI',
|
||||
label: 'Antigravity',
|
||||
shortLabel: 'Antigravity',
|
||||
installUrl: 'https://antigravity.google/docs/cli/install',
|
||||
},
|
||||
{
|
||||
kiro: {
|
||||
id: 'kiro',
|
||||
label: 'Kiro',
|
||||
shortLabel: 'Kiro',
|
||||
installUrl: 'https://kiro.dev/docs/cli',
|
||||
},
|
||||
{
|
||||
hermes: {
|
||||
id: 'hermes',
|
||||
label: 'Hermes Agent',
|
||||
shortLabel: 'Hermes',
|
||||
installUrl: 'https://hermes-agent.nousresearch.com/docs/getting-started/quickstart',
|
||||
},
|
||||
] as const
|
||||
}
|
||||
|
||||
export function createAiAgentAvailability(status: AiAgentStatus = 'checking', version: string | null = null): AiAgentAvailability {
|
||||
return { status, version }
|
||||
|
|
@ -94,7 +97,6 @@ export function createMissingAiAgentsStatus(): AiAgentsStatus {
|
|||
}
|
||||
|
||||
export function normalizeStoredAiAgent(value: string | null | undefined): AiAgentId | null {
|
||||
if (value === 'gemini') return 'antigravity'
|
||||
if (AI_AGENT_DEFINITIONS.some((definition) => definition.id === value)) return value as AiAgentId
|
||||
return null
|
||||
}
|
||||
|
|
@ -104,7 +106,9 @@ export function resolveDefaultAiAgent(value: string | null | undefined): AiAgent
|
|||
}
|
||||
|
||||
export function getAiAgentDefinition(agent: AiAgentId): AiAgentDefinition {
|
||||
return AI_AGENT_DEFINITIONS.find((definition) => definition.id === agent) ?? AI_AGENT_DEFINITIONS[0]
|
||||
return AI_AGENT_DEFINITIONS.find((definition) => definition.id === agent)
|
||||
?? LEGACY_AI_AGENT_DEFINITIONS[agent]
|
||||
?? AI_AGENT_DEFINITIONS[0]
|
||||
}
|
||||
|
||||
function normalizeAvailability(agent: { installed?: boolean | null; version?: string | null } | null | undefined): AiAgentAvailability {
|
||||
|
|
@ -116,7 +120,7 @@ function normalizeAvailability(agent: { installed?: boolean | null; version?: st
|
|||
}
|
||||
|
||||
function payloadForAgent(payload: AiAgentsStatusPayload | null | undefined, agent: AiAgentId) {
|
||||
return agent === 'antigravity' ? payload?.antigravity ?? payload?.gemini : payload?.[agent]
|
||||
return payload?.[agent]
|
||||
}
|
||||
|
||||
export function normalizeAiAgentsStatus(payload: AiAgentsStatusPayload | null | undefined): AiAgentsStatus {
|
||||
|
|
|
|||
Loading…
Reference in a new issue