Add initial project structure with essential files

- Created .gitignore to exclude build artifacts and dependencies.
- Added index.html as the main entry point for the application.
- Included LICENSE file with Apache 2.0 terms.
- Initialized package.json and package-lock.json for project dependencies.
- Added pnpm-lock.yaml for package management.
- Created QUICKSTART.md for setup instructions.
- Added README.md and README.zh-CN.md for project documentation in English and Chinese.
This commit is contained in:
pftom
2026-04-28 12:25:59 +08:00
commit a98096a042
258 changed files with 67862 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
import type { AppConfig } from '../types';
const STORAGE_KEY = 'open-claude-design:config';
export const DEFAULT_CONFIG: AppConfig = {
mode: 'daemon',
apiKey: '',
baseUrl: 'https://api.anthropic.com',
model: 'claude-sonnet-4-5',
agentId: null,
skillId: null,
designSystemId: null,
onboardingCompleted: false,
};
export function loadConfig(): AppConfig {
try {
const raw = localStorage.getItem(STORAGE_KEY);
if (!raw) return { ...DEFAULT_CONFIG };
const parsed = JSON.parse(raw) as Partial<AppConfig>;
return { ...DEFAULT_CONFIG, ...parsed };
} catch {
return { ...DEFAULT_CONFIG };
}
}
export function saveConfig(config: AppConfig): void {
localStorage.setItem(STORAGE_KEY, JSON.stringify(config));
}