Skip to content

Commit 7edcf94

Browse files
fix(types): add missing git methods and fix type mismatches in global.d.ts
- Add missing window.koda declarations: gitStatus, gitStage, gitUnstage, gitStageAll, gitCommit, gitPush, gitPull, gitLog, openExternal (methods existed in preload but were absent from Window interface) - Fix koClawStatus return type: was `{ ready, username }` but webhook-server.ts actually returns `{ running, port }` - Fix BrowserPreview.tsx: change allowpopups="true" (string) to allowpopups={true} (boolean) to match webview JSX type definition
1 parent 787671f commit 7edcf94

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

src/renderer/components/BrowserPreview.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ const BrowserPreview: React.FC<BrowserPreviewProps> = ({ initialUrl = 'http://lo
171171
src={url}
172172
style={{ width: '100%', height: '100%' }}
173173
className={isMobile ? 'rounded-xl' : ''}
174-
allowpopups="true"
174+
allowpopups={true}
175175
useragent={isMobile ? MOBILE_UA : DESKTOP_UA}
176176
/>
177177
</div>

src/renderer/global.d.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,21 @@ declare global {
5252
marketplaceUninstall: (skillName: string) => Promise<{ success: boolean; error?: string }>
5353
koClawStart: (config: { token: string; channelId?: string }) => Promise<{ success: boolean; error?: string }>
5454
koClawStop: () => Promise<{ success: boolean }>
55-
koClawStatus: () => Promise<{ running: boolean; ready: boolean; username: string | null }>
55+
koClawStatus: () => Promise<{ running: boolean; port: number | null }>
5656
discordEnable: () => Promise<{ success: boolean; error?: string }>
5757
discordDisable: () => Promise<{ success: boolean }>
5858
// Git
5959
gitInfo: (cwd: string) => Promise<{ success: boolean; branch: string | null; branches: string[] }>
6060
gitCheckout: (cwd: string, branch: string) => Promise<{ success: boolean; error?: string }>
61+
gitStatus: (cwd: string) => Promise<{ success: boolean; files?: any[]; error?: string }>
62+
gitStage: (cwd: string, filePath: string) => Promise<{ success: boolean; error?: string }>
63+
gitUnstage: (cwd: string, filePath: string) => Promise<{ success: boolean; error?: string }>
64+
gitStageAll: (cwd: string) => Promise<{ success: boolean; error?: string }>
65+
gitCommit: (cwd: string, message: string) => Promise<{ success: boolean; error?: string }>
66+
gitPush: (cwd: string) => Promise<{ success: boolean; error?: string }>
67+
gitPull: (cwd: string) => Promise<{ success: boolean; error?: string }>
68+
gitLog: (cwd: string) => Promise<{ success: boolean; commits?: any[]; currentBranch?: string; error?: string }>
69+
openExternal: (url: string) => Promise<{ success: boolean; error?: string }>
6170
minimize: () => Promise<void>
6271
maximize: () => Promise<void>
6372
close: () => Promise<void>

0 commit comments

Comments
 (0)