Release v0.1.3
This commit is contained in:
@@ -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 || '',
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user