-
-
-
Checkpoint
+export const CheckpointSaved = (props: CheckpointSavedProps) => {
+ const isCurrent = props.currentCheckpointHash === props.commitHash
+
+ return (
+
+
+
+ Checkpoint
+ {isCurrent && Current}
+
+
-
-
-)
+ )
+}
diff --git a/webview-ui/src/components/ui/popover.tsx b/webview-ui/src/components/ui/popover.tsx
index 09c6ba659a..3ab3344689 100644
--- a/webview-ui/src/components/ui/popover.tsx
+++ b/webview-ui/src/components/ui/popover.tsx
@@ -11,9 +11,11 @@ const PopoverAnchor = PopoverPrimitive.Anchor
const PopoverContent = React.forwardRef<
React.ElementRef
,
- React.ComponentPropsWithoutRef
->(({ className, align = "center", sideOffset = 4, ...props }, ref) => (
-
+ React.ComponentPropsWithoutRef & {
+ container?: HTMLElement
+ }
+>(({ className, align = "center", sideOffset = 4, container, ...props }, ref) => (
+
openAiModels: string[]
mcpServers: McpServer[]
+ currentCheckpoint?: string
filePaths: string[]
openedTabs: Array<{ label: string; isActive: boolean; path?: string }>
setApiConfiguration: (config: ApiConfiguration) => void
@@ -126,6 +127,7 @@ export const ExtensionStateContextProvider: React.FC<{ children: React.ReactNode
const [openAiModels, setOpenAiModels] = useState([])
const [mcpServers, setMcpServers] = useState([])
+ const [currentCheckpoint, setCurrentCheckpoint] = useState()
const setListApiConfigMeta = useCallback(
(value: ApiConfigMeta[]) => setState((prevState) => ({ ...prevState, listApiConfigMeta: value })),
@@ -241,6 +243,10 @@ export const ExtensionStateContextProvider: React.FC<{ children: React.ReactNode
setMcpServers(message.mcpServers ?? [])
break
}
+ case "currentCheckpointUpdated": {
+ setCurrentCheckpoint(message.text)
+ break
+ }
case "listApiConfig": {
setListApiConfigMeta(message.listApiConfig ?? [])
break
@@ -265,6 +271,7 @@ export const ExtensionStateContextProvider: React.FC<{ children: React.ReactNode
openRouterModels,
openAiModels,
mcpServers,
+ currentCheckpoint,
filePaths,
openedTabs,
soundVolume: state.soundVolume,