mirror of
https://github.com/siteboon/claudecodeui.git
synced 2026-04-15 10:01:31 +00:00
Compare commits
5 Commits
refactor/s
...
feature/re
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9d7d12742f | ||
|
|
1a0f10217d | ||
|
|
f8d1a0dd2c | ||
|
|
78c1d35a5d | ||
|
|
906997391d |
@@ -35,7 +35,8 @@
|
|||||||
"release": "./release.sh",
|
"release": "./release.sh",
|
||||||
"prepublishOnly": "npm run build",
|
"prepublishOnly": "npm run build",
|
||||||
"postinstall": "node scripts/fix-node-pty.js",
|
"postinstall": "node scripts/fix-node-pty.js",
|
||||||
"prepare": "husky"
|
"prepare": "husky",
|
||||||
|
"update:platform": "./update-platform.sh"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"claude code",
|
"claude code",
|
||||||
|
|||||||
@@ -435,13 +435,20 @@ app.post('/api/system/update', authenticateToken, async (req, res) => {
|
|||||||
|
|
||||||
console.log('Starting system update from directory:', projectRoot);
|
console.log('Starting system update from directory:', projectRoot);
|
||||||
|
|
||||||
// Run the update command based on install mode
|
// Platform deployments use their own update workflow from the project root.
|
||||||
const updateCommand = installMode === 'git'
|
const updateCommand = IS_PLATFORM
|
||||||
? 'git checkout main && git pull && npm install'
|
// In platform, husky and dev dependencies are not needed
|
||||||
: 'npm install -g @cloudcli-ai/cloudcli@latest';
|
? 'npm run update:platform'
|
||||||
|
: installMode === 'git'
|
||||||
|
? 'git checkout main && git pull && npm install'
|
||||||
|
: 'npm install -g @cloudcli-ai/cloudcli@latest';
|
||||||
|
|
||||||
|
const updateCwd = IS_PLATFORM || installMode === 'git'
|
||||||
|
? projectRoot
|
||||||
|
: os.homedir();
|
||||||
|
|
||||||
const child = spawn('sh', ['-c', updateCommand], {
|
const child = spawn('sh', ['-c', updateCommand], {
|
||||||
cwd: installMode === 'git' ? projectRoot : os.homedir(),
|
cwd: updateCwd,
|
||||||
env: process.env
|
env: process.env
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import { authenticatedFetch } from "../../../utils/api";
|
|||||||
import { ReleaseInfo } from "../../../types/sharedTypes";
|
import { ReleaseInfo } from "../../../types/sharedTypes";
|
||||||
import { copyTextToClipboard } from "../../../utils/clipboard";
|
import { copyTextToClipboard } from "../../../utils/clipboard";
|
||||||
import type { InstallMode } from "../../../hooks/useVersionCheck";
|
import type { InstallMode } from "../../../hooks/useVersionCheck";
|
||||||
|
import { IS_PLATFORM } from "../../../constants/config";
|
||||||
|
|
||||||
interface VersionUpgradeModalProps {
|
interface VersionUpgradeModalProps {
|
||||||
isOpen: boolean;
|
isOpen: boolean;
|
||||||
@@ -25,7 +26,9 @@ export function VersionUpgradeModal({
|
|||||||
const { t } = useTranslation('common');
|
const { t } = useTranslation('common');
|
||||||
const upgradeCommand = installMode === 'npm'
|
const upgradeCommand = installMode === 'npm'
|
||||||
? t('versionUpdate.npmUpgradeCommand')
|
? t('versionUpdate.npmUpgradeCommand')
|
||||||
: 'git checkout main && git pull && npm install';
|
: IS_PLATFORM
|
||||||
|
? 'npm run update:platform'
|
||||||
|
: 'git checkout main && git pull && npm install';
|
||||||
const [isUpdating, setIsUpdating] = useState(false);
|
const [isUpdating, setIsUpdating] = useState(false);
|
||||||
const [updateOutput, setUpdateOutput] = useState('');
|
const [updateOutput, setUpdateOutput] = useState('');
|
||||||
const [updateError, setUpdateError] = useState('');
|
const [updateError, setUpdateError] = useState('');
|
||||||
@@ -46,7 +49,8 @@ export function VersionUpgradeModal({
|
|||||||
if (response.ok) {
|
if (response.ok) {
|
||||||
setUpdateOutput(prev => prev + data.output + '\n');
|
setUpdateOutput(prev => prev + data.output + '\n');
|
||||||
setUpdateOutput(prev => prev + '\n✅ Update completed successfully!\n');
|
setUpdateOutput(prev => prev + '\n✅ Update completed successfully!\n');
|
||||||
setUpdateOutput(prev => prev + 'Please restart the server to apply changes.\n');
|
const text = IS_PLATFORM ? 'Please refresh the page after 5 seconds to load the new version. If that doesn\'t work, RESTART the environment.' : 'Please restart the server to apply changes.';
|
||||||
|
setUpdateOutput(prev => prev + text + '\n');
|
||||||
} else {
|
} else {
|
||||||
setUpdateError(data.error || 'Update failed');
|
setUpdateError(data.error || 'Update failed');
|
||||||
setUpdateOutput(prev => prev + '\n❌ Update failed: ' + (data.error || 'Unknown error') + '\n');
|
setUpdateOutput(prev => prev + '\n❌ Update failed: ' + (data.error || 'Unknown error') + '\n');
|
||||||
|
|||||||
Reference in New Issue
Block a user