Release v0.1.3

This commit is contained in:
winlifes
2026-05-11 05:30:48 -07:00
parent a903f7f0af
commit 69ab5710f6
9 changed files with 169 additions and 21 deletions
+7
View File
@@ -9,6 +9,7 @@ const DEFAULTS = {
toolProfile: 'core',
autostart: true,
maxInteractionLogEntries: 50,
lastClientTargetId: 'claude_code',
};
function getProjectPath() {
@@ -60,6 +61,11 @@ function normalizeProfile(value) {
return String(value || DEFAULTS.toolProfile).toLowerCase() === 'full' ? 'full' : 'core';
}
function normalizeClientTargetId(value) {
const normalized = String(value || '').trim();
return normalized || DEFAULTS.lastClientTargetId;
}
function loadConfig() {
const projectPath = getProjectPath();
const configPath = path.join(projectPath, 'funplay-cocos-mcp.config.json');
@@ -75,6 +81,7 @@ function loadConfig() {
maxInteractionLogEntries: Number.isInteger(fileConfig.maxInteractionLogEntries)
? Math.max(10, Math.min(500, fileConfig.maxInteractionLogEntries))
: DEFAULTS.maxInteractionLogEntries,
lastClientTargetId: normalizeClientTargetId(fileConfig.lastClientTargetId),
configPath,
configError: fileConfig.__error || '',
};