Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .vs/ProjectSettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"CurrentProjectSetting": null
}
6 changes: 6 additions & 0 deletions .vs/VSWorkspaceState.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"ExpandedNodes": [
""
],
"PreviewInSolutionExplorer": false
}
Binary file added .vs/slnx.sqlite
Binary file not shown.
Binary file added .vs/sublodex.slnx/v18/.wsuo
Binary file not shown.
113 changes: 113 additions & 0 deletions .vs/sublodex.slnx/v18/DocumentLayout.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
{
"Version": 1,
"WorkspaceRootPath": "J:\\Projects\\sublodex\\",
"Documents": [],
"DocumentGroupContainers": [
{
"Orientation": 0,
"VerticalTabListWidth": 256,
"DocumentGroups": [
{
"DockedWidth": 200,
"SelectedChildIndex": -1,
"Children": [
{
"$type": "Bookmark",
"Name": "ST:128:0:{1fc202d4-d401-403c-9834-5b218574bb67}"
},
{
"$type": "Bookmark",
"Name": "ST:131:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}"
},
{
"$type": "Bookmark",
"Name": "ST:132:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}"
},
{
"$type": "Bookmark",
"Name": "ST:133:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}"
},
{
"$type": "Bookmark",
"Name": "ST:129:0:{1fc202d4-d401-403c-9834-5b218574bb67}"
},
{
"$type": "Bookmark",
"Name": "ST:131:0:{1fc202d4-d401-403c-9834-5b218574bb67}"
},
{
"$type": "Bookmark",
"Name": "ST:130:0:{13b12e3e-c1b4-4539-9371-4fe9a0d523fc}"
},
{
"$type": "Bookmark",
"Name": "ST:128:0:{13b12e3e-c1b4-4539-9371-4fe9a0d523fc}"
},
{
"$type": "Bookmark",
"Name": "ST:1:0:{e8b06f52-6d01-11d2-aa7d-00c04f990343}"
},
{
"$type": "Bookmark",
"Name": "ST:130:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}"
},
{
"$type": "Bookmark",
"Name": "ST:0:0:{e506b91c-c606-466a-90a9-123d1d1e12b3}"
},
{
"$type": "Bookmark",
"Name": "ST:129:0:{75188d03-9892-4ae2-abf1-207126247ce5}"
},
{
"$type": "Bookmark",
"Name": "ST:130:0:{1fc202d4-d401-403c-9834-5b218574bb67}"
},
{
"$type": "Bookmark",
"Name": "ST:0:0:{df2740a2-19bf-324c-9ec7-e1b274384c15}"
},
{
"$type": "Bookmark",
"Name": "ST:1:0:{fabf9319-47eb-497e-b8f6-d9f73fba5f55}"
},
{
"$type": "Bookmark",
"Name": "ST:128:0:{75188d03-9892-4ae2-abf1-207126247ce5}"
},
{
"$type": "Bookmark",
"Name": "ST:0:0:{57d563b6-44a5-47df-85be-f4199ad6b651}"
},
{
"$type": "Bookmark",
"Name": "ST:0:0:{79664857-03bf-4bca-aa54-ec998b3328f8}"
},
{
"$type": "Bookmark",
"Name": "ST:0:0:{266c9e7b-20c9-3927-b630-727132b11a5b}"
},
{
"$type": "Bookmark",
"Name": "ST:0:0:{b2c3d4e5-f6a7-4b8c-9d0e-1f2a3b4c5d6e}"
},
{
"$type": "Bookmark",
"Name": "ST:0:0:{aa2115a1-9712-457b-9047-dbb71ca2cdd2}"
}
]
},
{
"DockedWidth": 151,
"SelectedChildIndex": -1,
"Children": [
{
"$type": "Bookmark",
"Name": "ST:0:0:{e1b7d1f8-9b3c-49b1-8f4f-bfc63a88835d}"
}
]
}
]
}
]
}
265 changes: 257 additions & 8 deletions bun.lock

Large diffs are not rendered by default.

9 changes: 8 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@
},
"dependencies": {
"@anthropic-ai/claude-agent-sdk": "^0.2.126",
"@milkdown/core": "^7.20.0",
"@milkdown/plugin-history": "^7.20.0",
"@milkdown/plugin-listener": "^7.20.0",
"@milkdown/preset-commonmark": "^7.20.0",
"@milkdown/prose": "^7.20.0",
"@milkdown/react": "^7.20.0",
"@milkdown/utils": "^7.20.0",
"@monaco-editor/react": "^4.6.0",
"@xterm/addon-fit": "^0.11.0",
"@xterm/xterm": "^6.0.0",
Expand All @@ -38,7 +45,7 @@
"@types/react-dom": "^18.3.0",
"@types/react-syntax-highlighter": "^15.5.13",
"@vitejs/plugin-react": "^4.3.1",
"concurrently": "^8.2.2",
"concurrently": "^9.2.1",
"typescript": "^5.5.3",
"vite": "^5.4.0"
}
Expand Down
46 changes: 35 additions & 11 deletions server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2090,27 +2090,51 @@ const server = Bun.serve<WsData, {}>({
}

if (url.pathname === '/api/pick-folder' && req.method === 'POST') {
if (process.platform !== 'darwin') {
return Response.json(
{ error: 'native picker is macOS only — paste the path manually' },
{ status: 501 },
);
let cmd: string;
let args: string[];
if (process.platform === 'darwin') {
cmd = 'osascript';
args = ['-e', 'POSIX path of (choose folder with prompt "Choose the project folder")'];
} else if (process.platform === 'win32') {
// PowerShell FolderBrowserDialog. STA mode is required for WinForms.
// A topmost dummy form is parented to the dialog so it doesn't get
// hidden behind the main app window.
const ps = [
"Add-Type -AssemblyName System.Windows.Forms;",
"$f = New-Object System.Windows.Forms.FolderBrowserDialog;",
"$f.Description = 'Choose the project folder';",
"$f.ShowNewFolderButton = $true;",
"$top = New-Object System.Windows.Forms.Form;",
"$top.TopMost = $true;",
"$r = $f.ShowDialog($top);",
"$top.Dispose();",
"if ($r -eq [System.Windows.Forms.DialogResult]::OK) { Write-Output $f.SelectedPath }",
].join(' ');
cmd = 'powershell.exe';
args = ['-NoProfile', '-STA', '-Command', ps];
} else {
// Linux / others: try zenity (GNOME) — falls through to error if missing.
cmd = 'zenity';
args = ['--file-selection', '--directory', '--title=Choose the project folder'];
}
return new Promise<Response>((resolve) => {
const proc = spawn('osascript', [
'-e',
'POSIX path of (choose folder with prompt "Choose the project folder")',
]);
const proc = spawn(cmd, args);
let out = '';
proc.stdout.on('data', (c: Buffer) => { out += c.toString(); });
proc.on('close', (code) => {
if (code === 0) {
const picked = out.trim().replace(/\/$/, '');
const picked = out.trim().replace(/[\/\\]$/, '');
if (code === 0 && picked) {
resolve(Response.json({ path: picked }));
} else {
resolve(Response.json({ canceled: true }));
}
});
proc.on('error', (e) => {
resolve(Response.json(
{ error: `folder picker failed: ${e.message}` },
{ status: 501 },
));
});
});
}

Expand Down
2 changes: 2 additions & 0 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { ThemePicker } from './components/ThemePicker';
import { QuickOpen } from './components/QuickOpen';
import { ProjectSwitcher } from './components/ProjectSwitcher';
import { Extensions } from './components/Extensions';
import { HeaderCommandPalette } from './components/HeaderCommandPalette';
import { useScopedTheme } from './components/ThemeApplier';
import { conversationToMarkdown, downloadMarkdown } from './lib/exportConversation';

Expand Down Expand Up @@ -151,6 +152,7 @@ export default function App() {
)}
{isStreaming && <span className="header__working">claude is working…</span>}
<span className="header__spacer" />
<HeaderCommandPalette />
{lastError && <span className="header__error" title={lastError}>error</span>}
{messageCount > 0 && (
<button
Expand Down
Loading