@codelia/runtime 0.1.22 → 0.1.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +17 -2
- package/dist/index.js +17 -2
- package/package.json +9 -9
package/dist/index.cjs
CHANGED
|
@@ -737,6 +737,13 @@ var resolveModelConfig = async (workingDir) => {
|
|
|
737
737
|
verbosity: effective.model?.verbosity
|
|
738
738
|
};
|
|
739
739
|
};
|
|
740
|
+
var resolveTuiConfig = async (workingDir) => {
|
|
741
|
+
const { globalConfig, projectConfig } = await loadConfigLayers(workingDir);
|
|
742
|
+
const effective = import_config.configRegistry.resolve([globalConfig, projectConfig]);
|
|
743
|
+
return {
|
|
744
|
+
theme: effective.tui?.theme
|
|
745
|
+
};
|
|
746
|
+
};
|
|
740
747
|
var resolvePermissionsConfig = async (workingDir) => {
|
|
741
748
|
const { globalConfig, projectConfig } = await loadConfigLayers(workingDir);
|
|
742
749
|
const effective = import_config.configRegistry.resolve([globalConfig, projectConfig]);
|
|
@@ -8907,7 +8914,14 @@ var createRuntimeHandlers = ({
|
|
|
8907
8914
|
state,
|
|
8908
8915
|
log: log2
|
|
8909
8916
|
});
|
|
8910
|
-
const handleInitialize = (id, params) => {
|
|
8917
|
+
const handleInitialize = async (id, params) => {
|
|
8918
|
+
let resolvedTheme;
|
|
8919
|
+
try {
|
|
8920
|
+
const workingDir = state.lastUiContext?.cwd ?? state.runtimeWorkingDir ?? process.cwd();
|
|
8921
|
+
resolvedTheme = (await resolveTuiConfig(workingDir)).theme;
|
|
8922
|
+
} catch (error) {
|
|
8923
|
+
log2(`initialize tui config load failed: ${String(error)}`);
|
|
8924
|
+
}
|
|
8911
8925
|
const result = {
|
|
8912
8926
|
protocol_version: PROTOCOL_VERSION,
|
|
8913
8927
|
server: { name: SERVER_NAME, version: SERVER_VERSION },
|
|
@@ -8922,7 +8936,8 @@ var createRuntimeHandlers = ({
|
|
|
8922
8936
|
supports_tool_call: true,
|
|
8923
8937
|
supports_theme_set: true,
|
|
8924
8938
|
supports_permission_preflight_events: true
|
|
8925
|
-
}
|
|
8939
|
+
},
|
|
8940
|
+
...resolvedTheme ? { tui: { theme: resolvedTheme } } : {}
|
|
8926
8941
|
};
|
|
8927
8942
|
sendResult(id, result);
|
|
8928
8943
|
log2(`initialize from ${params.client?.name ?? "unknown"}`);
|
package/dist/index.js
CHANGED
|
@@ -727,6 +727,13 @@ var resolveModelConfig = async (workingDir) => {
|
|
|
727
727
|
verbosity: effective.model?.verbosity
|
|
728
728
|
};
|
|
729
729
|
};
|
|
730
|
+
var resolveTuiConfig = async (workingDir) => {
|
|
731
|
+
const { globalConfig, projectConfig } = await loadConfigLayers(workingDir);
|
|
732
|
+
const effective = configRegistry.resolve([globalConfig, projectConfig]);
|
|
733
|
+
return {
|
|
734
|
+
theme: effective.tui?.theme
|
|
735
|
+
};
|
|
736
|
+
};
|
|
730
737
|
var resolvePermissionsConfig = async (workingDir) => {
|
|
731
738
|
const { globalConfig, projectConfig } = await loadConfigLayers(workingDir);
|
|
732
739
|
const effective = configRegistry.resolve([globalConfig, projectConfig]);
|
|
@@ -8929,7 +8936,14 @@ var createRuntimeHandlers = ({
|
|
|
8929
8936
|
state,
|
|
8930
8937
|
log: log2
|
|
8931
8938
|
});
|
|
8932
|
-
const handleInitialize = (id, params) => {
|
|
8939
|
+
const handleInitialize = async (id, params) => {
|
|
8940
|
+
let resolvedTheme;
|
|
8941
|
+
try {
|
|
8942
|
+
const workingDir = state.lastUiContext?.cwd ?? state.runtimeWorkingDir ?? process.cwd();
|
|
8943
|
+
resolvedTheme = (await resolveTuiConfig(workingDir)).theme;
|
|
8944
|
+
} catch (error) {
|
|
8945
|
+
log2(`initialize tui config load failed: ${String(error)}`);
|
|
8946
|
+
}
|
|
8933
8947
|
const result = {
|
|
8934
8948
|
protocol_version: PROTOCOL_VERSION,
|
|
8935
8949
|
server: { name: SERVER_NAME, version: SERVER_VERSION },
|
|
@@ -8944,7 +8958,8 @@ var createRuntimeHandlers = ({
|
|
|
8944
8958
|
supports_tool_call: true,
|
|
8945
8959
|
supports_theme_set: true,
|
|
8946
8960
|
supports_permission_preflight_events: true
|
|
8947
|
-
}
|
|
8961
|
+
},
|
|
8962
|
+
...resolvedTheme ? { tui: { theme: resolvedTheme } } : {}
|
|
8948
8963
|
};
|
|
8949
8964
|
sendResult(id, result);
|
|
8950
8965
|
log2(`initialize from ${params.client?.name ?? "unknown"}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codelia/runtime",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.23",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=20 <25"
|
|
@@ -23,14 +23,14 @@
|
|
|
23
23
|
"typecheck": "tsc --noEmit"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@codelia/config": "0.1.
|
|
27
|
-
"@codelia/config-loader": "0.1.
|
|
28
|
-
"@codelia/core": "0.1.
|
|
29
|
-
"@codelia/logger": "0.1.
|
|
30
|
-
"@codelia/model-metadata": "0.1.
|
|
31
|
-
"@codelia/protocol": "0.1.
|
|
32
|
-
"@codelia/shared-types": "0.1.
|
|
33
|
-
"@codelia/storage": "0.1.
|
|
26
|
+
"@codelia/config": "0.1.23",
|
|
27
|
+
"@codelia/config-loader": "0.1.23",
|
|
28
|
+
"@codelia/core": "0.1.23",
|
|
29
|
+
"@codelia/logger": "0.1.23",
|
|
30
|
+
"@codelia/model-metadata": "0.1.23",
|
|
31
|
+
"@codelia/protocol": "0.1.23",
|
|
32
|
+
"@codelia/shared-types": "0.1.23",
|
|
33
|
+
"@codelia/storage": "0.1.23",
|
|
34
34
|
"eventsource-parser": "^3.0.6",
|
|
35
35
|
"oauth4webapi": "^3.8.4",
|
|
36
36
|
"zod": "^4.3.5"
|