mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-04 21:23:07 +00:00
feat: Add Unlicense (more permissive than MIT) - Add LICENSE file with Unlicense which dedicates the software to the public domain
This commit is contained in:
24
LICENSE
Normal file
24
LICENSE
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
This is free and unencumbered software released into the public domain.
|
||||||
|
|
||||||
|
Anyone is free to copy, modify, publish, use, compile, sell, or
|
||||||
|
distribute this software, either in source code form or as a compiled
|
||||||
|
binary, for any purpose, commercial or non-commercial, and by any
|
||||||
|
means.
|
||||||
|
|
||||||
|
In jurisdictions that recognize copyright laws, the author or authors
|
||||||
|
of this software dedicate any and all copyright interest in the
|
||||||
|
software to the public domain. We make this dedication for the benefit
|
||||||
|
of the public at large and to the detriment of our heirs and
|
||||||
|
successors. We intend this dedication to be an overt act of
|
||||||
|
relinquishment in perpetuity of all present and future rights to this
|
||||||
|
software under copyright law.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||||
|
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||||
|
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
|
OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
For more information, please refer to <https://unlicense.org>
|
||||||
@@ -2,6 +2,7 @@
|
|||||||
"name": "automaker",
|
"name": "automaker",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
|
"license": "Unlicense",
|
||||||
"main": "electron/main.js",
|
"main": "electron/main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next dev -p 3007",
|
"dev": "next dev -p 3007",
|
||||||
|
|||||||
@@ -103,9 +103,12 @@ export function Sidebar() {
|
|||||||
setCurrentProject(project);
|
setCurrentProject(project);
|
||||||
|
|
||||||
if (initResult.createdFiles && initResult.createdFiles.length > 0) {
|
if (initResult.createdFiles && initResult.createdFiles.length > 0) {
|
||||||
toast.success(initResult.isNewProject ? "Project initialized" : "Project updated", {
|
toast.success(
|
||||||
description: `Set up ${initResult.createdFiles.length} file(s) in .automaker`,
|
initResult.isNewProject ? "Project initialized" : "Project updated",
|
||||||
});
|
{
|
||||||
|
description: `Set up ${initResult.createdFiles.length} file(s) in .automaker`,
|
||||||
|
}
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
toast.success("Project opened", {
|
toast.success("Project opened", {
|
||||||
description: `Opened ${name}`,
|
description: `Opened ${name}`,
|
||||||
@@ -124,28 +127,56 @@ export function Sidebar() {
|
|||||||
{
|
{
|
||||||
label: "Project",
|
label: "Project",
|
||||||
items: [
|
items: [
|
||||||
{ id: "board", label: "Kanban Board", icon: LayoutGrid, shortcut: NAV_SHORTCUTS.board },
|
{
|
||||||
{ id: "agent", label: "Agent Runner", icon: Bot, shortcut: NAV_SHORTCUTS.agent },
|
id: "board",
|
||||||
|
label: "Kanban Board",
|
||||||
|
icon: LayoutGrid,
|
||||||
|
shortcut: NAV_SHORTCUTS.board,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: "agent",
|
||||||
|
label: "Agent Runner",
|
||||||
|
icon: Bot,
|
||||||
|
shortcut: NAV_SHORTCUTS.agent,
|
||||||
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "Tools",
|
label: "Tools",
|
||||||
items: [
|
items: [
|
||||||
{ id: "spec", label: "Spec Editor", icon: FileText, shortcut: NAV_SHORTCUTS.spec },
|
{
|
||||||
{ id: "context", label: "Context", icon: BookOpen, shortcut: NAV_SHORTCUTS.context },
|
id: "spec",
|
||||||
{ id: "tools", label: "Agent Tools", icon: Wrench, shortcut: NAV_SHORTCUTS.tools },
|
label: "Spec Editor",
|
||||||
|
icon: FileText,
|
||||||
|
shortcut: NAV_SHORTCUTS.spec,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: "context",
|
||||||
|
label: "Context",
|
||||||
|
icon: BookOpen,
|
||||||
|
shortcut: NAV_SHORTCUTS.context,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: "tools",
|
||||||
|
label: "Agent Tools",
|
||||||
|
icon: Wrench,
|
||||||
|
shortcut: NAV_SHORTCUTS.tools,
|
||||||
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
// Handler for selecting a project by number key
|
// Handler for selecting a project by number key
|
||||||
const selectProjectByNumber = useCallback((num: number) => {
|
const selectProjectByNumber = useCallback(
|
||||||
const projectIndex = num - 1;
|
(num: number) => {
|
||||||
if (projectIndex >= 0 && projectIndex < projects.length) {
|
const projectIndex = num - 1;
|
||||||
setCurrentProject(projects[projectIndex]);
|
if (projectIndex >= 0 && projectIndex < projects.length) {
|
||||||
setIsProjectPickerOpen(false);
|
setCurrentProject(projects[projectIndex]);
|
||||||
}
|
setIsProjectPickerOpen(false);
|
||||||
}, [projects, setCurrentProject]);
|
}
|
||||||
|
},
|
||||||
|
[projects, setCurrentProject]
|
||||||
|
);
|
||||||
|
|
||||||
// Handle number key presses when project picker is open
|
// Handle number key presses when project picker is open
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@@ -215,7 +246,13 @@ export function Sidebar() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return shortcuts;
|
return shortcuts;
|
||||||
}, [currentProject, setCurrentView, toggleSidebar, projects.length, handleOpenFolder]);
|
}, [
|
||||||
|
currentProject,
|
||||||
|
setCurrentView,
|
||||||
|
toggleSidebar,
|
||||||
|
projects.length,
|
||||||
|
handleOpenFolder,
|
||||||
|
]);
|
||||||
|
|
||||||
// Register keyboard shortcuts
|
// Register keyboard shortcuts
|
||||||
useKeyboardShortcuts(navigationShortcuts);
|
useKeyboardShortcuts(navigationShortcuts);
|
||||||
@@ -232,36 +269,37 @@ export function Sidebar() {
|
|||||||
)}
|
)}
|
||||||
data-testid="sidebar"
|
data-testid="sidebar"
|
||||||
>
|
>
|
||||||
{/* Floating Collapse Toggle Button - Desktop only */}
|
{/* Floating Collapse Toggle Button - Desktop only - At border intersection */}
|
||||||
<div className="hidden lg:flex absolute top-1/2 -translate-y-1/2 -right-3 z-50 group/toggle">
|
<button
|
||||||
<button
|
onClick={toggleSidebar}
|
||||||
onClick={toggleSidebar}
|
className="hidden lg:flex absolute top-[68px] -right-3 z-[9999] group/toggle items-center justify-center w-6 h-6 rounded-full bg-zinc-800 border border-white/10 text-zinc-400 hover:text-white hover:bg-zinc-700 hover:border-white/20 transition-all shadow-lg titlebar-no-drag"
|
||||||
className="flex items-center justify-center w-6 h-6 rounded-full bg-zinc-800 border border-white/10 text-zinc-400 hover:text-white hover:bg-zinc-700 hover:border-white/20 transition-all shadow-lg titlebar-no-drag"
|
data-testid="sidebar-collapse-button"
|
||||||
data-testid="sidebar-collapse-button"
|
>
|
||||||
>
|
{sidebarOpen ? (
|
||||||
{sidebarOpen ? (
|
<PanelLeftClose className="w-3.5 h-3.5 pointer-events-none" />
|
||||||
<PanelLeftClose className="w-3.5 h-3.5" />
|
) : (
|
||||||
) : (
|
<PanelLeft className="w-3.5 h-3.5 pointer-events-none" />
|
||||||
<PanelLeft className="w-3.5 h-3.5" />
|
)}
|
||||||
)}
|
|
||||||
</button>
|
|
||||||
{/* Tooltip */}
|
{/* Tooltip */}
|
||||||
<div
|
<div
|
||||||
className="absolute left-full ml-2 px-2 py-1 bg-zinc-800 text-white text-xs rounded opacity-0 group-hover/toggle:opacity-100 transition-opacity whitespace-nowrap z-50 border border-zinc-700 pointer-events-none"
|
className="absolute left-full ml-2 px-2 py-1 bg-zinc-800 text-white text-xs rounded opacity-0 group-hover/toggle:opacity-100 transition-opacity whitespace-nowrap z-50 border border-zinc-700 pointer-events-none"
|
||||||
data-testid="sidebar-toggle-tooltip"
|
data-testid="sidebar-toggle-tooltip"
|
||||||
>
|
>
|
||||||
{sidebarOpen ? "Collapse sidebar" : "Expand sidebar"}{" "}
|
{sidebarOpen ? "Collapse sidebar" : "Expand sidebar"}{" "}
|
||||||
<span className="ml-1 px-1 py-0.5 bg-white/10 rounded text-[10px] font-mono" data-testid="sidebar-toggle-shortcut">
|
<span
|
||||||
|
className="ml-1 px-1 py-0.5 bg-white/10 rounded text-[10px] font-mono"
|
||||||
|
data-testid="sidebar-toggle-shortcut"
|
||||||
|
>
|
||||||
{UI_SHORTCUTS.toggleSidebar}
|
{UI_SHORTCUTS.toggleSidebar}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</button>
|
||||||
|
|
||||||
<div className="flex-1 flex flex-col overflow-hidden">
|
<div className="flex-1 flex flex-col overflow-hidden">
|
||||||
{/* Logo */}
|
{/* Logo */}
|
||||||
<div
|
<div
|
||||||
className={cn(
|
className={cn(
|
||||||
"h-20 pt-8 flex items-center justify-between border-b border-zinc-800 flex-shrink-0 titlebar-drag-region",
|
"h-20 pt-8 flex items-center justify-center border-b border-zinc-800 flex-shrink-0 titlebar-drag-region",
|
||||||
sidebarOpen ? "px-3 lg:px-6" : "px-3"
|
sidebarOpen ? "px-3 lg:px-6" : "px-3"
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
@@ -282,34 +320,46 @@ export function Sidebar() {
|
|||||||
Auto<span className="text-brand-500">maker</span>
|
Auto<span className="text-brand-500">maker</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Project Actions */}
|
|
||||||
{sidebarOpen && (
|
|
||||||
<div className="flex items-center gap-1 titlebar-no-drag">
|
|
||||||
<button
|
|
||||||
onClick={() => setCurrentView("welcome")}
|
|
||||||
className="group flex items-center justify-center w-8 h-8 rounded-lg relative overflow-hidden transition-all text-zinc-400 hover:text-white hover:bg-white/5"
|
|
||||||
title="New Project"
|
|
||||||
data-testid="new-project-button"
|
|
||||||
>
|
|
||||||
<Plus className="w-4 h-4 flex-shrink-0" />
|
|
||||||
</button>
|
|
||||||
<button
|
|
||||||
onClick={handleOpenFolder}
|
|
||||||
className="group flex items-center justify-center w-8 h-8 rounded-lg relative overflow-hidden transition-all text-zinc-400 hover:text-white hover:bg-white/5"
|
|
||||||
title={`Open Folder (${ACTION_SHORTCUTS.openProject})`}
|
|
||||||
data-testid="open-project-button"
|
|
||||||
>
|
|
||||||
<FolderOpen className="w-4 h-4 flex-shrink-0" />
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{/* Project Actions - Moved above project selector */}
|
||||||
|
{sidebarOpen && (
|
||||||
|
<div className="flex items-center gap-2 titlebar-no-drag px-2 mt-3">
|
||||||
|
<button
|
||||||
|
onClick={() => setCurrentView("welcome")}
|
||||||
|
className="group flex items-center justify-center flex-1 px-3 py-2.5 rounded-lg relative overflow-hidden transition-all text-zinc-400 hover:text-white hover:bg-white/5 border border-white/10"
|
||||||
|
title="New Project"
|
||||||
|
data-testid="new-project-button"
|
||||||
|
>
|
||||||
|
<Plus className="w-4 h-4 flex-shrink-0" />
|
||||||
|
<span className="ml-2 text-sm font-medium hidden lg:block whitespace-nowrap">
|
||||||
|
New
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
onClick={handleOpenFolder}
|
||||||
|
className="group flex items-center justify-center flex-1 px-3 py-2.5 rounded-lg relative overflow-hidden transition-all text-zinc-400 hover:text-white hover:bg-white/5 border border-white/10"
|
||||||
|
title={`Open Folder (${ACTION_SHORTCUTS.openProject})`}
|
||||||
|
data-testid="open-project-button"
|
||||||
|
>
|
||||||
|
<FolderOpen className="w-4 h-4 flex-shrink-0" />
|
||||||
|
<span className="ml-2 text-sm font-medium hidden lg:block whitespace-nowrap">
|
||||||
|
Open
|
||||||
|
</span>
|
||||||
|
<span className="hidden lg:flex items-center justify-center w-5 h-5 text-[10px] font-mono rounded bg-white/5 border border-white/10 text-zinc-500 ml-2">
|
||||||
|
{ACTION_SHORTCUTS.openProject}
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
{/* Project Selector */}
|
{/* Project Selector */}
|
||||||
{sidebarOpen && projects.length > 0 && (
|
{sidebarOpen && projects.length > 0 && (
|
||||||
<div className="px-2 mt-3">
|
<div className="px-2 mt-3">
|
||||||
<DropdownMenu open={isProjectPickerOpen} onOpenChange={setIsProjectPickerOpen}>
|
<DropdownMenu
|
||||||
|
open={isProjectPickerOpen}
|
||||||
|
onOpenChange={setIsProjectPickerOpen}
|
||||||
|
>
|
||||||
<DropdownMenuTrigger asChild>
|
<DropdownMenuTrigger asChild>
|
||||||
<button
|
<button
|
||||||
className="w-full flex items-center justify-between px-3 py-2.5 rounded-lg bg-white/5 border border-white/10 hover:bg-white/10 transition-all text-white titlebar-no-drag"
|
className="w-full flex items-center justify-between px-3 py-2.5 rounded-lg bg-white/5 border border-white/10 hover:bg-white/10 transition-all text-white titlebar-no-drag"
|
||||||
@@ -367,7 +417,6 @@ export function Sidebar() {
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|
||||||
{/* Nav Items - Scrollable */}
|
{/* Nav Items - Scrollable */}
|
||||||
<nav className="flex-1 overflow-y-auto px-2 mt-4 pb-2">
|
<nav className="flex-1 overflow-y-auto px-2 mt-4 pb-2">
|
||||||
{!currentProject && sidebarOpen ? (
|
{!currentProject && sidebarOpen ? (
|
||||||
@@ -438,7 +487,8 @@ export function Sidebar() {
|
|||||||
<span
|
<span
|
||||||
className={cn(
|
className={cn(
|
||||||
"hidden lg:flex items-center justify-center w-5 h-5 text-[10px] font-mono rounded bg-white/5 border border-white/10 text-zinc-500",
|
"hidden lg:flex items-center justify-center w-5 h-5 text-[10px] font-mono rounded bg-white/5 border border-white/10 text-zinc-500",
|
||||||
isActive && "bg-brand-500/10 border-brand-500/20 text-brand-400"
|
isActive &&
|
||||||
|
"bg-brand-500/10 border-brand-500/20 text-brand-400"
|
||||||
)}
|
)}
|
||||||
data-testid={`shortcut-${item.id}`}
|
data-testid={`shortcut-${item.id}`}
|
||||||
>
|
>
|
||||||
@@ -503,7 +553,8 @@ export function Sidebar() {
|
|||||||
<span
|
<span
|
||||||
className={cn(
|
className={cn(
|
||||||
"hidden lg:flex items-center justify-center w-5 h-5 text-[10px] font-mono rounded bg-white/5 border border-white/10 text-zinc-500",
|
"hidden lg:flex items-center justify-center w-5 h-5 text-[10px] font-mono rounded bg-white/5 border border-white/10 text-zinc-500",
|
||||||
isActiveRoute("settings") && "bg-brand-500/10 border-brand-500/20 text-brand-400"
|
isActiveRoute("settings") &&
|
||||||
|
"bg-brand-500/10 border-brand-500/20 text-brand-400"
|
||||||
)}
|
)}
|
||||||
data-testid="shortcut-settings"
|
data-testid="shortcut-settings"
|
||||||
>
|
>
|
||||||
@@ -517,7 +568,6 @@ export function Sidebar() {
|
|||||||
)}
|
)}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</aside>
|
</aside>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user