mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-06 12:54:20 +01:00
fix: update settings and skills handling with assistant redirect (#220)
* fix: enable swipe-back suspension on more drawer and remove unused variable * refactor(frontend): improve dialog component and settings navigation * fix: disable route swipe suspension in MoreDrawer to prevent unintended navigation * fix(frontend): enable swipe-back suspension on more drawer route * refactor(frontend): improve mobile navigation drawer and tab bar * feat: add schedules service and workspace hook with navigation updates * chore: add workspace hook, schedules library, and tests * fix: prevent MoreDrawer sentinel from undoing navigation * feat: per-agent model selection and UI refinements (#217) * feat: per-agent model selection and UI refinements - Add agentModels store with setAgentModel/getAgentModel - PromptInput uses session model priority and stores agent model on change - useContextUsage derives model from assistant message instead of global - Migrate sub-agent/subtask badges from purple to blue with refined styling - Fix MoreDrawer sentinel to skip history-back on navigation * refactor: improve per-agent model selection and task tool call status indicators * feat: add repo management skill and internal repos API * fix: improve assistant session launcher and UI components * fix: update atomic-json test assertions * refactor: split Assistant Mode instructions between AGENTS.md and assistant.md * loop: todo-header-mobile completed after 3 iterations (#218) * loop: stt-perf-1 completed after 5 iterations * fix: load audio worklet per recording context * fix: canonicalize assistant navigation routes * fix: adjust scroll-up threshold for header visibility * fix: update settings and skills handling with assistant redirect * refactor: simplify context usage indicator and extract token sum helper * feat: add currently selected model row to popover and fix responsive truncate
This commit is contained in:
1 parent
c7291518c8
commit
74cdeb3926
73 files changed
+4073
-632
No files matched your search
@@ -14,7 +14,7 @@ type RepoSkillsDialogBaseProps = {
|
||||
}
|
||||
|
||||
type RepoSkillsDialogProps = RepoSkillsDialogBaseProps & (
|
||||
| { sessionId: string; opcodeUrl: string; directory: string; onSkillLoaded?: (skill: SkillFileInfo) => void }
|
||||
| { sessionId: string; opcodeUrl: string; directory?: string; onSkillLoaded?: (skill: SkillFileInfo) => void }
|
||||
| { sessionId?: undefined; opcodeUrl?: undefined; directory?: undefined; onSkillLoaded?: undefined }
|
||||
)
|
||||
|
||||
@@ -28,9 +28,9 @@ export function RepoSkillsDialog({
|
||||
onSkillLoaded,
|
||||
}: RepoSkillsDialogProps) {
|
||||
const { isLoading, data, error } = useQuery({
|
||||
queryKey: ['settings', 'skills', repoId],
|
||||
queryFn: () => settingsApi.listManagedSkills(repoId),
|
||||
enabled: open && !!repoId,
|
||||
queryKey: directory ? ['settings', 'skills', 'directory', directory] : ['settings', 'skills', repoId],
|
||||
queryFn: () => settingsApi.listManagedSkills(repoId, directory),
|
||||
enabled: open && (!!repoId || !!directory),
|
||||
staleTime: 30000,
|
||||
})
|
||||
|
||||
@@ -64,7 +64,7 @@ export function RepoSkillsDialog({
|
||||
onOpenChange(false)
|
||||
}
|
||||
|
||||
if (!repoId) {
|
||||
if (!repoId && !sessionId) {
|
||||
return null
|
||||
}
|
||||
|
||||
|
||||
@@ -60,10 +60,11 @@ export function RepoSkillsList({
|
||||
{data.map((skill) => (
|
||||
<div
|
||||
key={skill.name}
|
||||
className="p-2 rounded-lg border border-border bg-card flex items-center justify-between gap-2"
|
||||
onClick={() => onLoad?.(skill)}
|
||||
className={`p-2 rounded-lg border border-border bg-card flex items-center justify-between gap-2 ${onLoad ? 'cursor-pointer hover:bg-accent transition-colors' : ''}`}
|
||||
>
|
||||
<div className="flex-1 min-w-0">
|
||||
<p className="text-sm font-medium truncate">
|
||||
<p className="text-sm font-medium truncate text-orange-600 dark:text-orange-400">
|
||||
{formatSkillName(skill.name)}
|
||||
</p>
|
||||
{skill.description && (
|
||||
@@ -72,15 +73,6 @@ export function RepoSkillsList({
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
{onLoad && (
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => onLoad(skill)}
|
||||
className="shrink-0 text-xs font-medium text-primary hover:text-foreground transition-colors"
|
||||
>
|
||||
Load
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user