mirror of
https://github.com/pacnpal/Roo-Code.git
synced 2025-12-20 20:31:37 -05:00
Refactor extension state into ExtensionStateContext
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
import { VSCodeButton } from "@vscode/webview-ui-toolkit/react"
|
||||
import { useExtensionState } from "../context/ExtensionStateContext"
|
||||
import { vscode } from "../utils/vscode"
|
||||
import { HistoryItem } from "../../../src/shared/HistoryItem"
|
||||
|
||||
type HistoryPreviewProps = {
|
||||
taskHistory: HistoryItem[]
|
||||
showHistoryView: () => void
|
||||
}
|
||||
|
||||
const HistoryPreview = ({ taskHistory, showHistoryView }: HistoryPreviewProps) => {
|
||||
const HistoryPreview = ({ showHistoryView }: HistoryPreviewProps) => {
|
||||
const { taskHistory } = useExtensionState()
|
||||
const handleHistorySelect = (id: string) => {
|
||||
vscode.postMessage({ type: "showTaskWithId", text: id })
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user