Changesets · Branches · Tags · Compare
| Changeset | cb40c4d7041330965d04b7343399b17351021fd5cdb4cbcbe2b30c02825bd45a |
|---|---|
| Author | uinstinct <61635505+uinstinct@users.noreply.github.com> · 2025-07-15 12:56 +05:30 |
| Committer | uinstinct <61635505+uinstinct@users.noreply.github.com> · 2025-07-15 12:56 +05:30 |
| Parents | 7ceef566a463 |
7 files changed
modified core/core.ts +0 −4
| @@ -292,10 +292,6 @@ | ||
| 292 | 292 | historyManager.clearAll(); |
| 293 | 293 | }); |
| 294 | 294 | |
| 295 | - on("history/getSessionData", (msg) => { | |
| 296 | - return historyManager.getSessionData(msg.data.id); | |
| 297 | - }); | |
| 298 | - | |
| 299 | 295 | on("devdata/log", async (msg) => { |
| 300 | 296 | void DataLogger.getInstance().logDevData(msg.data); |
| 301 | 297 | }); |
modified core/protocol/core.ts +0 −1
| @@ -67,7 +67,6 @@ | ||
| 67 | 67 | "history/load": [{ id: string }, Session]; |
| 68 | 68 | "history/save": [Session, void]; |
| 69 | 69 | "history/clear": [undefined, void]; |
| 70 | - "history/getSessionData": [{ id: string }, string]; | |
| 71 | 70 | "devdata/log": [DevDataLogEvent, void]; |
| 72 | 71 | "config/addOpenAiKey": [string, void]; |
| 73 | 72 | "config/addModel": [ |
modified core/protocol/passThrough.ts +0 −1
| @@ -15,7 +15,6 @@ | ||
| 15 | 15 | "history/load", |
| 16 | 16 | "history/save", |
| 17 | 17 | "history/clear", |
| 18 | - "history/getSessionData", | |
| 19 | 18 | "devdata/log", |
| 20 | 19 | "config/addModel", |
| 21 | 20 | "config/newPromptFile", |
modified core/util/history.test.ts +0 −14
| @@ -37,12 +37,6 @@ | ||
| 37 | 37 | sessionId: testSessionId, |
| 38 | 38 | }); |
| 39 | 39 | }); |
| 40 | - | |
| 41 | - test("Getting session data for non-existent session throws error", () => { | |
| 42 | - expect(() => { | |
| 43 | - historyManager.getSessionData(testSessionId); | |
| 44 | - }).toThrow(); | |
| 45 | - }); | |
| 46 | 40 | }); |
| 47 | 41 | |
| 48 | 42 | describe("Full session lifecycle", () => { |
| @@ -61,14 +55,6 @@ | ||
| 61 | 55 | expect(retrievedSession).toEqual(testSession); |
| 62 | 56 | }); |
| 63 | 57 | |
| 64 | - test("Getting session data returns formatted JSON string", () => { | |
| 65 | - const sessionData = historyManager.getSessionData(testSession.sessionId); | |
| 66 | - const parsed = JSON.parse(sessionData); | |
| 67 | - expect(parsed.sessionId).toBe(testSession.sessionId); | |
| 68 | - expect(parsed.title).toBe(testSession.title); | |
| 69 | - expect(parsed.workspaceDirectory).toBe(testSession.workspaceDirectory); | |
| 70 | - }); | |
| 71 | - | |
| 72 | 58 | test("Saving session with new title updates session", () => { |
| 73 | 59 | const modifiedSession = { ...testSession }; |
| 74 | 60 | modifiedSession.title = `Edited: ${testSession.title}`; |
modified core/util/history.ts +0 −13
| @@ -95,19 +95,6 @@ | ||
| 95 | 95 | } |
| 96 | 96 | } |
| 97 | 97 | |
| 98 | - getSessionData(sessionId: string): string { | |
| 99 | - try { | |
| 100 | - const sessionFile = getSessionFilePath(sessionId); | |
| 101 | - if (!fs.existsSync(sessionFile)) { | |
| 102 | - throw new Error(`Session file ${sessionFile} does not exist`); | |
| 103 | - } | |
| 104 | - const fileContent = fs.readFileSync(sessionFile, "utf8"); | |
| 105 | - return JSON.stringify(JSON.parse(fileContent), null, 2); | |
| 106 | - } catch (e) { | |
| 107 | - throw new Error(`Error reading session data: ${e}`); | |
| 108 | - } | |
| 109 | - } | |
| 110 | - | |
| 111 | 98 | save(session: Session) { |
| 112 | 99 | // Save the main session json file |
| 113 | 100 | // Explicitely rewriting here to influence the written key order in the file! |
modified extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/constants/MessageTypes.kt +0 −1
| @@ -81,7 +81,6 @@ | ||
| 81 | 81 | "history/load", |
| 82 | 82 | "history/save", |
| 83 | 83 | "history/clear", |
| 84 | - "history/getSessionData", | |
| 85 | 84 | "devdata/log", |
| 86 | 85 | "config/addModel", |
| 87 | 86 | "config/newPromptFile", |
modified gui/src/pages/config/HelpCenterSection.tsx +3 −3
| @@ -23,14 +23,14 @@ | ||
| 23 | 23 | |
| 24 | 24 | const handleViewSessionData = async () => { |
| 25 | 25 | try { |
| 26 | - const sessionData = await ideMessenger.request("history/getSessionData", { | |
| 26 | + const sessionData = await ideMessenger.request("history/load", { | |
| 27 | 27 | id: currentSession.id, |
| 28 | 28 | }); |
| 29 | 29 | |
| 30 | 30 | if (sessionData.status === "success") { |
| 31 | 31 | await ideMessenger.request("showVirtualFile", { |
| 32 | - name: "currentSessionData.json", | |
| 33 | - content: sessionData.content, | |
| 32 | + name: `${sessionData.content.title}.json`, | |
| 33 | + content: JSON.stringify(sessionData.content, null, 2), | |
| 34 | 34 | }); |
| 35 | 35 | } |
| 36 | 36 | } catch (error) { |