mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-30 19:46:52 +00:00
fix: resolve live config paths in status and gateway metadata (#39952)
* fix: resolve live config paths in status and gateway metadata * fix: resolve remaining runtime config path references * test: cover gateway config.set config path response
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { resolveAgentWorkspaceDir, resolveDefaultAgentId } from "../../agents/agent-scope.js";
|
||||
import { listChannelPlugins } from "../../channels/plugins/index.js";
|
||||
import {
|
||||
CONFIG_PATH,
|
||||
createConfigIO,
|
||||
loadConfig,
|
||||
parseConfigJson5,
|
||||
readConfigFileSnapshot,
|
||||
@@ -197,6 +197,7 @@ function buildConfigRestartSentinelPayload(params: {
|
||||
threadId: ReturnType<typeof extractDeliveryInfo>["threadId"];
|
||||
note: string | undefined;
|
||||
}): RestartSentinelPayload {
|
||||
const configPath = createConfigIO().configPath;
|
||||
return {
|
||||
kind: params.kind,
|
||||
status: "ok",
|
||||
@@ -208,7 +209,7 @@ function buildConfigRestartSentinelPayload(params: {
|
||||
doctorHint: formatDoctorNonInteractiveHint(),
|
||||
stats: {
|
||||
mode: params.mode,
|
||||
root: CONFIG_PATH,
|
||||
root: configPath,
|
||||
},
|
||||
};
|
||||
}
|
||||
@@ -323,7 +324,7 @@ export const configHandlers: GatewayRequestHandlers = {
|
||||
true,
|
||||
{
|
||||
ok: true,
|
||||
path: CONFIG_PATH,
|
||||
path: createConfigIO().configPath,
|
||||
config: redactConfigObject(parsed.config, parsed.schema.uiHints),
|
||||
},
|
||||
undefined,
|
||||
@@ -440,7 +441,7 @@ export const configHandlers: GatewayRequestHandlers = {
|
||||
true,
|
||||
{
|
||||
ok: true,
|
||||
path: CONFIG_PATH,
|
||||
path: createConfigIO().configPath,
|
||||
config: redactConfigObject(validated.config, schemaPatch.uiHints),
|
||||
restart,
|
||||
sentinel: {
|
||||
@@ -500,7 +501,7 @@ export const configHandlers: GatewayRequestHandlers = {
|
||||
true,
|
||||
{
|
||||
ok: true,
|
||||
path: CONFIG_PATH,
|
||||
path: createConfigIO().configPath,
|
||||
config: redactConfigObject(parsed.config, parsed.schema.uiHints),
|
||||
restart,
|
||||
sentinel: {
|
||||
|
||||
Reference in New Issue
Block a user