mirror of
https://github.com/leonvanzyl/autocoder.git
synced 2026-01-30 06:12:06 +00:00
Merge pull request #115 from ipodishima/fix/build
Fix latest build issues from master
This commit is contained in:
19
start_ui.py
19
start_ui.py
@@ -137,10 +137,25 @@ def check_node() -> bool:
|
|||||||
|
|
||||||
|
|
||||||
def install_npm_deps() -> bool:
|
def install_npm_deps() -> bool:
|
||||||
"""Install npm dependencies if node_modules doesn't exist."""
|
"""Install npm dependencies if node_modules doesn't exist or is stale."""
|
||||||
node_modules = UI_DIR / "node_modules"
|
node_modules = UI_DIR / "node_modules"
|
||||||
|
package_json = UI_DIR / "package.json"
|
||||||
|
package_lock = UI_DIR / "package-lock.json"
|
||||||
|
|
||||||
if node_modules.exists():
|
# Check if npm install is needed
|
||||||
|
needs_install = False
|
||||||
|
|
||||||
|
if not node_modules.exists():
|
||||||
|
needs_install = True
|
||||||
|
elif package_json.exists():
|
||||||
|
# If package.json or package-lock.json is newer than node_modules, reinstall
|
||||||
|
node_modules_mtime = node_modules.stat().st_mtime
|
||||||
|
if package_json.stat().st_mtime > node_modules_mtime:
|
||||||
|
needs_install = True
|
||||||
|
elif package_lock.exists() and package_lock.stat().st_mtime > node_modules_mtime:
|
||||||
|
needs_install = True
|
||||||
|
|
||||||
|
if not needs_install:
|
||||||
print(" npm dependencies already installed")
|
print(" npm dependencies already installed")
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|||||||
6
ui/package-lock.json
generated
6
ui/package-lock.json
generated
@@ -3024,7 +3024,7 @@
|
|||||||
"version": "19.2.9",
|
"version": "19.2.9",
|
||||||
"resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.9.tgz",
|
"resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.9.tgz",
|
||||||
"integrity": "sha512-Lpo8kgb/igvMIPeNV2rsYKTgaORYdO1XGVZ4Qz3akwOj0ySGYMPlQWa8BaLn0G63D1aSaAQ5ldR06wCpChQCjA==",
|
"integrity": "sha512-Lpo8kgb/igvMIPeNV2rsYKTgaORYdO1XGVZ4Qz3akwOj0ySGYMPlQWa8BaLn0G63D1aSaAQ5ldR06wCpChQCjA==",
|
||||||
"dev": true,
|
"devOptional": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"csstype": "^3.2.2"
|
"csstype": "^3.2.2"
|
||||||
@@ -3034,7 +3034,7 @@
|
|||||||
"version": "19.2.3",
|
"version": "19.2.3",
|
||||||
"resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.2.3.tgz",
|
"resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.2.3.tgz",
|
||||||
"integrity": "sha512-jp2L/eY6fn+KgVVQAOqYItbF0VY/YApe5Mz2F0aykSO8gx31bYCZyvSeYxCHKvzHG5eZjc+zyaS5BrBWya2+kQ==",
|
"integrity": "sha512-jp2L/eY6fn+KgVVQAOqYItbF0VY/YApe5Mz2F0aykSO8gx31bYCZyvSeYxCHKvzHG5eZjc+zyaS5BrBWya2+kQ==",
|
||||||
"dev": true,
|
"devOptional": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@types/react": "^19.2.0"
|
"@types/react": "^19.2.0"
|
||||||
@@ -3658,7 +3658,7 @@
|
|||||||
"version": "3.2.3",
|
"version": "3.2.3",
|
||||||
"resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz",
|
"resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz",
|
||||||
"integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==",
|
"integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==",
|
||||||
"dev": true,
|
"devOptional": true,
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/d3-color": {
|
"node_modules/d3-color": {
|
||||||
|
|||||||
@@ -168,7 +168,7 @@ export function ConversationHistory({
|
|||||||
<Button
|
<Button
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
size="icon"
|
size="icon"
|
||||||
onClick={(e) => handleDeleteClick(e, conversation)}
|
onClick={(e: React.MouseEvent) => handleDeleteClick(e, conversation)}
|
||||||
className={`h-8 w-8 mr-2 ${
|
className={`h-8 w-8 mr-2 ${
|
||||||
isCurrent
|
isCurrent
|
||||||
? 'opacity-60 hover:opacity-100'
|
? 'opacity-60 hover:opacity-100'
|
||||||
|
|||||||
@@ -349,7 +349,7 @@ export function DebugLogViewer({
|
|||||||
<Button
|
<Button
|
||||||
variant={activeTab === 'agent' ? 'secondary' : 'ghost'}
|
variant={activeTab === 'agent' ? 'secondary' : 'ghost'}
|
||||||
size="sm"
|
size="sm"
|
||||||
onClick={(e) => {
|
onClick={(e: React.MouseEvent) => {
|
||||||
e.stopPropagation()
|
e.stopPropagation()
|
||||||
setActiveTab('agent')
|
setActiveTab('agent')
|
||||||
}}
|
}}
|
||||||
@@ -366,7 +366,7 @@ export function DebugLogViewer({
|
|||||||
<Button
|
<Button
|
||||||
variant={activeTab === 'devserver' ? 'secondary' : 'ghost'}
|
variant={activeTab === 'devserver' ? 'secondary' : 'ghost'}
|
||||||
size="sm"
|
size="sm"
|
||||||
onClick={(e) => {
|
onClick={(e: React.MouseEvent) => {
|
||||||
e.stopPropagation()
|
e.stopPropagation()
|
||||||
setActiveTab('devserver')
|
setActiveTab('devserver')
|
||||||
}}
|
}}
|
||||||
@@ -383,7 +383,7 @@ export function DebugLogViewer({
|
|||||||
<Button
|
<Button
|
||||||
variant={activeTab === 'terminal' ? 'secondary' : 'ghost'}
|
variant={activeTab === 'terminal' ? 'secondary' : 'ghost'}
|
||||||
size="sm"
|
size="sm"
|
||||||
onClick={(e) => {
|
onClick={(e: React.MouseEvent) => {
|
||||||
e.stopPropagation()
|
e.stopPropagation()
|
||||||
setActiveTab('terminal')
|
setActiveTab('terminal')
|
||||||
}}
|
}}
|
||||||
@@ -421,7 +421,7 @@ export function DebugLogViewer({
|
|||||||
<Button
|
<Button
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
size="icon"
|
size="icon"
|
||||||
onClick={(e) => {
|
onClick={(e: React.MouseEvent) => {
|
||||||
e.stopPropagation()
|
e.stopPropagation()
|
||||||
handleClear()
|
handleClear()
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -120,7 +120,7 @@ export function ProjectSelector({
|
|||||||
<Button
|
<Button
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
size="icon-xs"
|
size="icon-xs"
|
||||||
onClick={(e) => handleDeleteClick(e, project.name)}
|
onClick={(e: React.MouseEvent) => handleDeleteClick(e, project.name)}
|
||||||
className="text-muted-foreground hover:text-destructive"
|
className="text-muted-foreground hover:text-destructive"
|
||||||
>
|
>
|
||||||
<Trash2 size={14} />
|
<Trash2 size={14} />
|
||||||
|
|||||||
@@ -335,7 +335,7 @@ export function ScheduleModal({ projectName, isOpen, onClose }: ScheduleModalPro
|
|||||||
<Checkbox
|
<Checkbox
|
||||||
id="yolo-mode"
|
id="yolo-mode"
|
||||||
checked={newSchedule.yolo_mode}
|
checked={newSchedule.yolo_mode}
|
||||||
onCheckedChange={(checked) =>
|
onCheckedChange={(checked: boolean | 'indeterminate') =>
|
||||||
setNewSchedule((prev) => ({ ...prev, yolo_mode: checked === true }))
|
setNewSchedule((prev) => ({ ...prev, yolo_mode: checked === true }))
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ export function ThemeSelector({ themes, currentTheme, onThemeChange }: ThemeSele
|
|||||||
const [isOpen, setIsOpen] = useState(false)
|
const [isOpen, setIsOpen] = useState(false)
|
||||||
const [previewTheme, setPreviewTheme] = useState<ThemeId | null>(null)
|
const [previewTheme, setPreviewTheme] = useState<ThemeId | null>(null)
|
||||||
const containerRef = useRef<HTMLDivElement>(null)
|
const containerRef = useRef<HTMLDivElement>(null)
|
||||||
const timeoutRef = useRef<NodeJS.Timeout | null>(null)
|
const timeoutRef = useRef<ReturnType<typeof setTimeout> | null>(null)
|
||||||
|
|
||||||
// Close dropdown when clicking outside
|
// Close dropdown when clicking outside
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
"lib": ["ES2023"],
|
"lib": ["ES2023"],
|
||||||
"module": "ESNext",
|
"module": "ESNext",
|
||||||
"skipLibCheck": true,
|
"skipLibCheck": true,
|
||||||
|
"types": ["node"],
|
||||||
|
|
||||||
/* Bundler mode */
|
/* Bundler mode */
|
||||||
"moduleResolution": "bundler",
|
"moduleResolution": "bundler",
|
||||||
|
|||||||
Reference in New Issue
Block a user