feat(agent-runner, session-management): enhance markdown formatting and session hotkey functionality

- Added a React library for proper markdown formatting in the Agent Runner, improving the display of session messages.
- Changed the hotkey for creating a new session from "W" to "N" to ensure consistency across new feature buttons.
- Updated the feature list to include new entries for these enhancements, along with a detailed implementation roadmap in the project specification.

These changes improve user experience by enhancing message readability and streamlining session management.
This commit is contained in:
Cody Seibert
2025-12-10 09:20:00 -05:00
parent 1766357335
commit 3d6add5272
11 changed files with 260 additions and 23 deletions

View File

@@ -137,8 +137,7 @@ export function useElectronAgent({
let mounted = true;
const initialize = async () => {
// Reset state when switching sessions
setIsProcessing(false);
// Reset error state when switching sessions
setError(null);
try {
@@ -154,13 +153,23 @@ export function useElectronAgent({
console.log("[useElectronAgent] Loaded", result.messages.length, "messages");
setMessages(result.messages);
setIsConnected(true);
// Check if the agent is currently running for this session
const historyResult = await window.electronAPI.agent.getHistory(sessionId);
if (mounted && historyResult.success) {
const isRunning = historyResult.isRunning || false;
console.log("[useElectronAgent] Session running state:", isRunning);
setIsProcessing(isRunning);
}
} else {
setError(result.error || "Failed to start session");
setIsProcessing(false);
}
} catch (err) {
if (!mounted) return;
console.error("[useElectronAgent] Failed to initialize:", err);
setError(err instanceof Error ? err.message : "Failed to initialize");
setIsProcessing(false);
}
};