File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ const mocks = vi.hoisted(() => ({
77 listCommitments : vi . fn ( ) ,
88 markCommitmentsStatus : vi . fn ( ) ,
99 resolveCommitmentStorePath : vi . fn ( ( ) => "/tmp/openclaw-commitments.json" ) ,
10- loadConfig : vi . fn ( ( ) => ( {
10+ getRuntimeConfig : vi . fn ( ( ) => ( {
1111 commitments : {
1212 store : "/tmp/openclaw-commitments.json" ,
1313 } ,
@@ -21,7 +21,7 @@ vi.mock("../commitments/store.js", () => ({
2121} ) ) ;
2222
2323vi . mock ( "../config/config.js" , ( ) => ( {
24- loadConfig : mocks . loadConfig ,
24+ getRuntimeConfig : mocks . getRuntimeConfig ,
2525} ) ) ;
2626
2727function createRuntime ( ) : { runtime : RuntimeEnv ; logs : string [ ] } {
Original file line number Diff line number Diff line change 44 resolveCommitmentStorePath ,
55} from "../commitments/store.js" ;
66import type { CommitmentRecord , CommitmentStatus } from "../commitments/types.js" ;
7- import { loadConfig } from "../config/config.js" ;
7+ import { getRuntimeConfig } from "../config/config.js" ;
88import { info } from "../globals.js" ;
99import type { RuntimeEnv } from "../runtime.js" ;
1010import { normalizeOptionalString } from "../shared/string-coerce.js" ;
@@ -87,7 +87,7 @@ export async function commitmentsListCommand(
8787 opts : { json ?: boolean ; status ?: string ; all ?: boolean ; agent ?: string } ,
8888 runtime : RuntimeEnv ,
8989) : Promise < void > {
90- const cfg = loadConfig ( ) ;
90+ const cfg = getRuntimeConfig ( ) ;
9191 const status = opts . all ? undefined : parseStatus ( opts . status ?? "pending" , runtime ) ;
9292 if ( ! opts . all && opts . status && ! status ) {
9393 return ;
@@ -144,7 +144,7 @@ export async function commitmentsDismissCommand(
144144 runtime . exit ( 1 ) ;
145145 return ;
146146 }
147- const cfg = loadConfig ( ) ;
147+ const cfg = getRuntimeConfig ( ) ;
148148 await markCommitmentsStatus ( {
149149 cfg,
150150 ids,
You can’t perform that action at this time.
0 commit comments