Skip to content

Commit

Permalink
feat(view): view에서 Github Info를 fetch하도록 명령하는 기능
Browse files Browse the repository at this point in the history
  • Loading branch information
seungineer committed Oct 14, 2024
1 parent 19beb07 commit 79bbf99
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/view/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const App = () => {
ideAdapter.addIDESentEventListener(callbacks);
ideAdapter.sendFetchAnalyzedDataMessage();
ideAdapter.sendFetchBranchListMessage();
ideAdapter.sendFetchGithubInfo();
initRef.current = true;
}
}, [handleChangeAnalyzedData, handleChangeBranchList, handleGithubInfo, ideAdapter, setLoading]);
Expand Down
1 change: 1 addition & 0 deletions packages/view/src/ide/IDEPort.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ export default interface IDEPort {
sendRefreshDataMessage: (payload?: string) => void;
sendFetchAnalyzedDataMessage: (payload?: string) => void;
sendFetchBranchListMessage: () => void;
sendFetchGithubInfo: () => void;
setCustomTheme: (theme: string) => void;
}
9 changes: 9 additions & 0 deletions packages/view/src/ide/VSCodeIDEAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ export default class VSCodeIDEAdapter implements IDEPort {
return events.handleChangeAnalyzedData(payloadData);
case "fetchBranchList":
return events.handleChangeBranchList(payloadData);
case "fetchGithubInfo":
return events.handleGithubInfo(payloadData);
default:
console.log("Unknown Message");
}
Expand Down Expand Up @@ -49,6 +51,13 @@ export default class VSCodeIDEAdapter implements IDEPort {
this.sendMessageToIDE(message);
}

public sendFetchGithubInfo() {
const message: IDEMessage = {
command: "fetchGithubInfo",
};
this.sendMessageToIDE(message);
}

public setCustomTheme(theme: string) {
const message: IDEMessage = {
command: "updateCustomTheme",
Expand Down
1 change: 1 addition & 0 deletions packages/view/src/types/IDEMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ export type IDEMessageCommandNames =
| "fetchAnalyzedData"
| "fetchBranchList"
| "fetchCurrentBranch"
| "fetchGithubInfo"
| "updateCustomTheme";

0 comments on commit 79bbf99

Please sign in to comment.