summaryrefslogtreecommitdiffhomepage
path: root/packages/app/src
diff options
context:
space:
mode:
Diffstat (limited to 'packages/app/src')
-rw-r--r--packages/app/src/pages/session.tsx10
1 files changed, 10 insertions, 0 deletions
diff --git a/packages/app/src/pages/session.tsx b/packages/app/src/pages/session.tsx
index 3a14cf401..719e13f00 100644
--- a/packages/app/src/pages/session.tsx
+++ b/packages/app/src/pages/session.tsx
@@ -93,6 +93,15 @@ function SessionReviewTab(props: SessionReviewTabProps) {
let frame: number | undefined
let pending: { x: number; y: number } | undefined
+ const sdk = useSDK()
+
+ const readFile = (path: string) => {
+ return sdk.client.file
+ .read({ path })
+ .then((x) => x.data)
+ .catch(() => undefined)
+ }
+
const restoreScroll = (retries = 0) => {
const el = scroll
if (!el) return
@@ -161,6 +170,7 @@ function SessionReviewTab(props: SessionReviewTabProps) {
diffStyle={props.diffStyle}
onDiffStyleChange={props.onDiffStyleChange}
onViewFile={props.onViewFile}
+ readFile={readFile}
/>
)
}