- check-sf-extension-inventory.mjs: expand parseDirectRegisteredCommands()
scan to include 7 more files (guards/inturn.js, notifications/notify.js,
permissions/index.js, ui/usage-bar.js, commands/legacy/audit.js,
commands/legacy/create-extension.js, commands/legacy/create-slash-command.js)
and filter results by BASE_RUNTIME_COMMAND_NAMES to exclude doc-string false
positives ("name" in create-slash-command.js template text)
- extension-manifest.json: remove 'clear' (subcommand of logs/notifications,
never a top-level pi.registerCommand)
- packages/pi-agent-core/src/db/sf-db.ts: fix 23 noVoidTypeReturn errors
- openDatabase: void → boolean (caller uses return value at line 5625)
- claimEscalationOverride: void → boolean (caller checks at escalation.js:243)
- resolveSelfFeedbackEntry: void → boolean (caller checks at self-feedback.js:387)
- copyWorktreeDb: void → boolean (caller checks at reconcileWorktreeDb)
- compactUokMessages: void → {before,after} (caller returns value at message-bus.js:238)
- insertSessionTurn: void → bigint|null (caller uses id at session-recorder.js:104)
- expireStaleMemories: void → number (caller uses count at auto-start.js:1047)
- deleteMemorySourceRow: void → boolean (caller returns value at memory-source-store.js:107)
- deleteMemoryEmbedding: void → boolean (caller returns value at memory-embeddings.js:328)
- updateBacklogItemStatus: remove dead return expression (callers discard value)
- removeBacklogItem: remove dead return expression (callers discard value)
- updateGateCircuitBreaker: remove dead return {total,avgMs,...} (wrong-type
code accidentally merged from getGateLatencyStats, never reachable)
- markUokMessageRead: remove dead return true/false (callers discard value)
- Auto-fix formatting and organizeImports in ~30 source files (biome --write)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
54 lines
1.8 KiB
TypeScript
54 lines
1.8 KiB
TypeScript
"use client";
|
|
|
|
import { GripVerticalIcon } from "lucide-react";
|
|
import type * as React from "react";
|
|
import { Group, Panel, Separator } from "react-resizable-panels";
|
|
|
|
import { cn } from "@/lib/utils";
|
|
|
|
function ResizablePanelGroup({
|
|
className,
|
|
...props
|
|
}: React.ComponentProps<typeof Group>) {
|
|
return (
|
|
<Group
|
|
data-slot="resizable-panel-group"
|
|
className={cn(
|
|
"flex h-full w-full data-[panel-group-direction=vertical]:flex-col",
|
|
className,
|
|
)}
|
|
{...props}
|
|
/>
|
|
);
|
|
}
|
|
|
|
function ResizablePanel({ ...props }: React.ComponentProps<typeof Panel>) {
|
|
return <Panel data-slot="resizable-panel" {...props} />;
|
|
}
|
|
|
|
function ResizableHandle({
|
|
withHandle,
|
|
className,
|
|
...props
|
|
}: React.ComponentProps<typeof Separator> & {
|
|
withHandle?: boolean;
|
|
}) {
|
|
return (
|
|
<Separator
|
|
data-slot="resizable-handle"
|
|
className={cn(
|
|
"bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:translate-x-0 data-[panel-group-direction=vertical]:after:-translate-y-1/2 [&[data-panel-group-direction=vertical]>div]:rotate-90",
|
|
className,
|
|
)}
|
|
{...props}
|
|
>
|
|
{withHandle && (
|
|
<div className="bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border">
|
|
<GripVerticalIcon className="size-2.5" />
|
|
</div>
|
|
)}
|
|
</Separator>
|
|
);
|
|
}
|
|
|
|
export { ResizableHandle, ResizablePanel, ResizablePanelGroup };
|