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