wraith/src-tauri/installer.nsi.template
Vantz Stockwell 512347af5f
All checks were successful
Build & Sign Wraith / Build Windows + Sign (push) Successful in 3m6s
feat: Local PTY Copilot Panel — replace Gemini stub with real terminal
Ripped out the Gemini API stub (ai/mod.rs, ai_commands.rs, GeminiPanel.vue)
and replaced it with a local PTY terminal in the sidebar panel. Users select
a shell (bash/zsh/sh on Unix, PowerShell/CMD/Git Bash on Windows), launch it,
and run claude/gemini/codex or any CLI tool directly.

Backend:
- New PtyService module using portable-pty (cross-platform PTY)
- DashMap session registry (same pattern as SshService)
- spawn_blocking output loop (portable-pty reader is synchronous)
- 5 Tauri commands: list_available_shells, spawn_local_shell, pty_write,
  pty_resize, disconnect_pty

Frontend:
- Parameterized useTerminal composable: backend='ssh'|'pty'
- convertEol=false for PTY (PTY driver handles LF→CRLF)
- CopilotPanel.vue with shell selector, launch/kill, session ended prompt
- Ctrl+Shift+G toggle preserved

Tests: 87 total (5 new PTY tests), zero warnings

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 20:43:18 -04:00

53 lines
1.8 KiB
Plaintext

!include "MUI2.nsh"
!include "nsDialogs.nsh"
!include "LogicLib.nsh"
!include "WinMessages.nsh"
Name "Wraith"
OutFile "OUTFILE_PLACEHOLDER"
InstallDir "$PROGRAMFILES64\Wraith"
RequestExecutionLevel admin
Var DesktopShortcut
!insertmacro MUI_PAGE_DIRECTORY
Page custom OptionsPage OptionsPageLeave
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_LANGUAGE "English"
Function OptionsPage
nsDialogs::Create 1018
Pop $0
${NSD_CreateCheckbox} 0 0 100% 12u "Create Desktop Shortcut"
Pop $1
; Unchecked by default — no ${NSD_Check}
nsDialogs::Show
FunctionEnd
Function OptionsPageLeave
${NSD_GetState} $1 $DesktopShortcut
FunctionEnd
Section "Install"
SetOutPath "$INSTDIR"
File "Wraith.exe"
File "wraith.ico"
CreateDirectory "$SMPROGRAMS\Wraith"
CreateShortcut "$SMPROGRAMS\Wraith\Wraith.lnk" "$INSTDIR\Wraith.exe" "" "$INSTDIR\wraith.ico"
${If} $DesktopShortcut == ${BST_CHECKED}
CreateShortcut "$DESKTOP\Wraith.lnk" "$INSTDIR\Wraith.exe" "" "$INSTDIR\wraith.ico"
${EndIf}
WriteUninstaller "$INSTDIR\uninstall.exe"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Wraith" "DisplayName" "Wraith"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Wraith" "UninstallString" "$INSTDIR\uninstall.exe"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Wraith" "DisplayVersion" "VER_PLACEHOLDER"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Wraith" "Publisher" "Vigilance Cyber"
SectionEnd
Section "Uninstall"
Delete "$INSTDIR\Wraith.exe"
Delete "$INSTDIR\wraith.ico"
Delete "$INSTDIR\uninstall.exe"
RMDir "$INSTDIR"
Delete "$SMPROGRAMS\Wraith\Wraith.lnk"
RMDir "$SMPROGRAMS\Wraith"
Delete "$DESKTOP\Wraith.lnk"
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Wraith"
SectionEnd