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