@wrongstack/webui 0.54.1 → 0.63.4

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.
@@ -227,7 +227,7 @@ function createDefaultContainer(opts) {
227
227
  () => new DefaultPermissionPolicy({
228
228
  trustFile: wpaths.projectTrust,
229
229
  yolo: opts.permission?.yolo ?? false,
230
- forceAllYolo: opts.permission?.forceAllYolo ?? false,
230
+ yoloDestructive: opts.permission?.yoloDestructive ?? opts.permission?.forceAllYolo ?? false,
231
231
  promptDelegate: opts.permission?.promptDelegate
232
232
  })
233
233
  );
@@ -1781,7 +1781,15 @@ async function startWebUI(opts = {}) {
1781
1781
  });
1782
1782
  let autoCompactor;
1783
1783
  if (config.context?.autoCompact !== false) {
1784
- const effectiveMaxContext = config.context?.effectiveMaxContext ?? provider.capabilities.maxContext;
1784
+ let effectiveMaxContext = config.context?.effectiveMaxContext ?? 0;
1785
+ if (!effectiveMaxContext) {
1786
+ try {
1787
+ const m = await modelsRegistry.getModel(provider.id, context.model);
1788
+ effectiveMaxContext = m?.capabilities?.maxContext ?? 0;
1789
+ } catch {
1790
+ }
1791
+ }
1792
+ if (!effectiveMaxContext) effectiveMaxContext = provider.capabilities.maxContext;
1785
1793
  autoCompactor = new AutoCompactionMiddleware(
1786
1794
  compactor,
1787
1795
  effectiveMaxContext,