local-operator-ui 0.24.2 → 0.24.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.
Files changed (2) hide show
  1. package/out/main/index.js +16 -3
  2. package/package.json +1 -1
package/out/main/index.js CHANGED
@@ -17039,6 +17039,10 @@ const WINDOW_MODE_ENV = "LOCAL_OPERATOR_UI_WINDOW_MODE";
17039
17039
  const WINDOW_SIZE_ENV = "LOCAL_OPERATOR_UI_WINDOW_SIZE";
17040
17040
  const WINDOW_MODE_FLAG = "--window-mode";
17041
17041
  const WINDOW_SIZE_FLAG = "--window-size";
17042
+ const AGENT_LAUNCH_FLAGS = [
17043
+ "--user-data-dir",
17044
+ "--remote-debugging-port"
17045
+ ];
17042
17046
  const WINDOW_MIN_WIDTH = 800;
17043
17047
  const WINDOW_MIN_HEIGHT = 600;
17044
17048
  const WINDOW_MAX_EDGE = 16384;
@@ -17082,18 +17086,25 @@ function resolveWindowLaunchPlan(input = {}) {
17082
17086
  const argv = input.argv ?? [];
17083
17087
  const problems = [];
17084
17088
  const modeFlag = readFlag(argv, WINDOW_MODE_FLAG);
17085
- const modeRaw = modeFlag.found ? modeFlag.value : env[WINDOW_MODE_ENV];
17089
+ const modeValue = modeFlag.found ? modeFlag.value : env[WINDOW_MODE_ENV];
17090
+ const modeRaw = typeof modeValue === "string" && modeValue.trim() === "" ? void 0 : modeValue;
17086
17091
  const parsedMode = parseWindowMode(modeRaw);
17092
+ const agentFlag = !modeFlag.found && modeRaw === void 0 ? AGENT_LAUNCH_FLAGS.find((flag) => readFlag(argv, flag).found) : void 0;
17093
+ const assumed = agentFlag ? `${agentFlag} marks an agent-driven launch, and no window mode was named` : null;
17087
17094
  if (modeFlag.found && modeFlag.value === void 0) {
17088
17095
  problems.push(
17089
17096
  `${WINDOW_MODE_FLAG} needs a value: ${WINDOW_MODES.join("|")}`
17090
17097
  );
17098
+ } else if (modeValue !== void 0 && modeRaw === void 0) {
17099
+ problems.push(
17100
+ `${modeFlag.found ? WINDOW_MODE_FLAG : WINDOW_MODE_ENV} names no mode (empty value)${assumed ? "" : "; using normal"}`
17101
+ );
17091
17102
  } else if (parsedMode === null && modeRaw !== void 0) {
17092
17103
  problems.push(
17093
17104
  `${modeFlag.found ? WINDOW_MODE_FLAG : WINDOW_MODE_ENV}="${modeRaw}" is not one of ${WINDOW_MODES.join("|")}; using normal`
17094
17105
  );
17095
17106
  }
17096
- const mode = parsedMode ?? "normal";
17107
+ const mode = parsedMode ?? (assumed ? "headless" : "normal");
17097
17108
  const sizeFlag = readFlag(argv, WINDOW_SIZE_FLAG);
17098
17109
  const sizeRaw = sizeFlag.found ? sizeFlag.value : env[WINDOW_SIZE_ENV];
17099
17110
  const parsedSize = parseWindowSize(sizeRaw);
@@ -17123,6 +17134,7 @@ function resolveWindowLaunchPlan(input = {}) {
17123
17134
  }
17124
17135
  return {
17125
17136
  mode,
17137
+ assumed,
17126
17138
  ...WINDOW_BEHAVIOUR[mode],
17127
17139
  width,
17128
17140
  height,
@@ -17131,7 +17143,8 @@ function resolveWindowLaunchPlan(input = {}) {
17131
17143
  }
17132
17144
  function describeWindowLaunch(plan) {
17133
17145
  const behaviour = plan.show === "never" ? "window created and never shown" : plan.show === "inactive" ? "window shown without activating the app" : "window shown and focused";
17134
- return `window mode ${plan.mode}: ${plan.width}x${plan.height}, ${behaviour}, page throttling ${plan.backgroundThrottling ? "on" : "off"}`;
17146
+ const assumption = plan.assumed ? ` (assumed: ${plan.assumed})` : "";
17147
+ return `window mode ${plan.mode}${assumption}: ${plan.width}x${plan.height}, ${behaviour}, page throttling ${plan.backgroundThrottling ? "on" : "off"}`;
17135
17148
  }
17136
17149
  const BASE64_FILE_EXTENSIONS = ["csv", "tsv", "xls", "xlsx", "ods"];
17137
17150
  const resolveUserPath = (filePath, cwd) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "local-operator-ui",
3
- "version": "0.24.2",
3
+ "version": "0.24.4",
4
4
  "productName": "Local Operator",
5
5
  "description": "User interface for AI agent assistants that run Python code safely on your device through an intuitive chat interface. Supports local and cloud LLM models with built-in security features.",
6
6
  "main": "./out/main/index.js",