Elffuss BraidHub

kikocis/continue public

Merge pull request #6624 from uinstinct/session-file

Changesetbeec9aab9cdf5b4d73dc04ab3c86f819b74e856168e946a6f163f2989b79c302
AuthorDallin Romney <dallinromney@gmail.com> · 2025-07-18 11:48 +02:00
CommitterGitHub <noreply@github.com> · 2025-07-18 11:48 +02:00
Parents11fa65088c6a, 01051dd917b5

Browse the files at this changeset

1 file changed

modified gui/src/pages/config/HelpCenterSection.tsx +26 −1
@@ -1,13 +1,14 @@
11 import {
22 ArrowTopRightOnSquareIcon,
33 DocumentArrowUpIcon,
4+ NumberedListIcon,
45 PaintBrushIcon,
56 TableCellsIcon,
67 } from "@heroicons/react/24/outline";
78 import { useContext } from "react";
89 import { useNavigate } from "react-router-dom";
910 import { IdeMessengerContext } from "../../context/IdeMessenger";
10-import { useAppDispatch } from "../../redux/hooks";
11+import { useAppDispatch, useAppSelector } from "../../redux/hooks";
1112 import { setOnboardingCard } from "../../redux/slices/uiSlice";
1213 import { saveCurrentSession } from "../../redux/thunks/session";
1314 import { ROUTES } from "../../util/navigation";
@@ -18,6 +19,21 @@
1819 const navigate = useNavigate();
1920 const dispatch = useAppDispatch();
2021
22+ const currentSession = useAppSelector((state) => state.session);
23+
24+ const handleViewSessionData = async () => {
25+ const sessionData = await ideMessenger.request("history/load", {
26+ id: currentSession.id,
27+ });
28+
29+ if (sessionData.status === "success") {
30+ await ideMessenger.request("showVirtualFile", {
31+ name: `${sessionData.content.title}.json`,
32+ content: JSON.stringify(sessionData.content, null, 2),
33+ });
34+ }
35+ };
36+
2137 return (
2238 <div className="py-5">
2339 <h3 className="mb-4 mt-0 text-xl">Help center</h3>
@@ -68,6 +84,15 @@
6884 onClick={() => navigate("/stats")}
6985 />
7086
87+ {currentSession.history.length > 0 && !currentSession.isStreaming && (
88+ <MoreHelpRow
89+ title="View current session history"
90+ description="Open the current chat session file for troubleshooting"
91+ Icon={NumberedListIcon}
92+ onClick={handleViewSessionData}
93+ />
94+ )}
95+
7196 <MoreHelpRow
7297 title="Quickstart"
7398 description="Reopen the quickstart and tutorial file"