mirror of
https://github.com/stablyai/orca.git
synced 2026-11-01 17:47:40 +00:00
* feat(native-chat): Codex chats list and run the skills Codex loaded A Codex chat's skill list now comes from Codex itself (`skills/list`), live while the chat runs and refreshed when Codex says its skills changed, and from a short-lived Codex check while the chat is at rest. Plugin skills keep Codex's `plugin:skill` names, disabled skills drop out, and each skill file is its own row. A skill picked from the list reaches Codex as that exact skill, beside the unchanged `$name` text, on hosts that take it. * test(native-chat): account for Codex's skill list call; send without a trailing argument * fix: align skill probes with chat launches and preserve picked mentions * fix: distinguish skill choices in phone accessibility labels * fix: clear picked skill files when queued text changes * fix(native-chat): refresh resting commands when launch settings change * fix: keep WSL agent refresh on its execution host * fix: preserve skill selection at read and send boundaries * fix: narrow agent identity for selected skill notice * fix: use checked agent predicate for skill notice label * test: retain locale in composer translation mocks
25 lines
958 B
TypeScript
25 lines
958 B
TypeScript
import type { DiscoveredSkill } from './skills'
|
|
import type { NativeChatSessionSkill } from './native-chat-slash-commands'
|
|
import type { NativeChatPickerItem } from './native-chat-picker-items'
|
|
import { stripUnsafeDisplayCharacters } from './skill-display-text'
|
|
|
|
export function locatedPickerSkill(
|
|
skill: NativeChatSessionSkill,
|
|
path: string,
|
|
scanned: DiscoveredSkill | undefined,
|
|
skillSigil: '/' | '$',
|
|
duplicate: boolean
|
|
): Extract<NativeChatPickerItem, { kind: 'skill' }> {
|
|
const description = skill.description ?? scanned?.description
|
|
return {
|
|
kind: 'skill',
|
|
id: `skill:${path}`,
|
|
name: skill.name,
|
|
token: `${skillSigil}${skill.name}`,
|
|
description: description ? stripUnsafeDisplayCharacters(description).slice(0, 240) : null,
|
|
sources: scanned ? [{ sourceKind: scanned.sourceKind, skillFilePath: path }] : [],
|
|
path,
|
|
...(duplicate ? { location: stripUnsafeDisplayCharacters(path).slice(0, 4096) } : {})
|
|
}
|
|
}
|