focus continue session id command
This commit is contained in:
parent
95a42720c0
commit
e83f8e1928
5 changed files with 28 additions and 1 deletions
|
|
@ -66,6 +66,7 @@ export type ToWebviewFromIdeProtocol = ToWebviewFromIdeOrCoreProtocol & {
|
|||
* @deprecated Use navigateTo with a path instead.
|
||||
*/
|
||||
viewHistory: [undefined, void];
|
||||
focusContinueSessionId: [{ sessionId: string | undefined }, void];
|
||||
newSession: [undefined, void];
|
||||
setTheme: [{ theme: any }, void];
|
||||
setColors: [{ [key: string]: string }, void];
|
||||
|
|
|
|||
1
extensions/vscode/package-lock.json
generated
1
extensions/vscode/package-lock.json
generated
|
|
@ -116,6 +116,7 @@
|
|||
"dotenv": "^16.4.5",
|
||||
"fastest-levenshtein": "^1.0.16",
|
||||
"follow-redirects": "^1.15.5",
|
||||
"google-auth-library": "^9.14.2",
|
||||
"handlebars": "^4.7.8",
|
||||
"http-proxy-agent": "^7.0.1",
|
||||
"https-proxy-agent": "^7.0.3",
|
||||
|
|
|
|||
|
|
@ -280,6 +280,12 @@
|
|||
"category": "Continue",
|
||||
"title": "Docs Force Re-Index",
|
||||
"group": "Continue"
|
||||
},
|
||||
{
|
||||
"command": "continue.focusContinueSessionId",
|
||||
"category": "Continue",
|
||||
"title": "Focus Continue Chat",
|
||||
"group": "Continue"
|
||||
}
|
||||
],
|
||||
"keybindings": [
|
||||
|
|
|
|||
|
|
@ -480,6 +480,14 @@ const commandsMap: (
|
|||
"continue.viewHistory": () => {
|
||||
sidebar.webviewProtocol?.request("viewHistory", undefined);
|
||||
},
|
||||
"continue.focusContinueSessionId": async (sessionId: string | undefined) => {
|
||||
if (!sessionId) {
|
||||
sessionId = await vscode.window.showInputBox({
|
||||
prompt: "Enter the Session ID"
|
||||
});
|
||||
}
|
||||
sidebar.webviewProtocol?.request("focusContinueSessionId", { sessionId });
|
||||
},
|
||||
"continue.applyCodeFromChat": () => {
|
||||
sidebar.webviewProtocol.request("applyCodeFromChat", undefined);
|
||||
},
|
||||
|
|
|
|||
|
|
@ -151,7 +151,7 @@ function TipTapEditor(props: TipTapEditorProps) {
|
|||
);
|
||||
const useActiveFile = useSelector(selectUseActiveFile);
|
||||
|
||||
const { saveSession } = useHistory(dispatch);
|
||||
const { saveSession, loadSession } = useHistory(dispatch);
|
||||
|
||||
const posthog = usePostHog();
|
||||
const [isEditorFocused, setIsEditorFocused] = useState(false);
|
||||
|
|
@ -807,6 +807,17 @@ function TipTapEditor(props: TipTapEditorProps) {
|
|||
!props.isMainInput,
|
||||
);
|
||||
|
||||
useWebviewListener(
|
||||
"focusContinueSessionId",
|
||||
async (data) => {
|
||||
if (!props.isMainInput) {
|
||||
return;
|
||||
}
|
||||
loadSession(data.sessionId);
|
||||
},
|
||||
[loadSession, props.isMainInput],
|
||||
);
|
||||
|
||||
const [showDragOverMsg, setShowDragOverMsg] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue