comate_cli/terminal_agent/transcript_viewer.py
126-        return shutil.get_terminal_size((120, 40)).columns
127:    except Exception:
128-        return 120
133-        return max(1, shutil.get_terminal_size((120, 40)).lines - 2)
134:    except Exception:
135-        return _DEFAULT_BODY_HEIGHT
comate_cli/terminal_agent/mention_completer.py
339-                self._get_deep_paths()
340:            except Exception:
341-                logger.debug("deep mention cache warmup failed", exc_info=True)
348-                        on_complete()
349:                    except Exception:
350-                        logger.debug(
comate_cli/terminal_agent/custom_slash_commands.py
185-        frontmatter = yaml.safe_load(parts[1]) or {}
186:    except Exception as exc:
187-        return (
comate_cli/terminal_agent/tui.py
200-            self._status_bar.set_mode(self._session.get_mode())
201:        except Exception:
202-            pass
907-            await self._status_bar.refresh()
908:        except Exception as exc:
909-            logger.exception("failed to resume goal from TUI prompt")
960-                return
961:            except Exception:
962-                pass
1142-            history_path = _get_input_history_path(cwd)
1143:        except Exception:
1144-            logger.debug("Failed to create FileHistory, falling back to InMemoryHistory", exc_info=True)
1147-            _truncate_file_history(history_path, _INPUT_HISTORY_MAX_ENTRIES)
1148:        except Exception:
1149-            logger.warning(
1358-            result = recall_latest_turn()
1359:        except Exception:
1360-            logger.debug("latest turn recall failed", exc_info=True)
1540-            )
1541:        except Exception:
1542-            logger.warning(
1600-                self._session._agent._context.add_system_reminder_message(hint)
1601:        except Exception:
1602-            logger.debug("path context hint injection failed", exc_info=True)
1605-            await self._session.send(text)
1606:        except Exception as exc:
1607-            logger.exception("send failed")
1815-            raise
1816:        except Exception as exc:
1817-            logger.exception("session event pump failed")
1906-            self._status_bar.set_mode(self._session.get_mode())
1907:        except Exception:
1908-            pass
1921-            self._status_bar.set_mode(self._session.get_mode())
1922:        except Exception:
1923-            pass
1993-                return
1994:            except Exception:
1995-                logger.exception("background task failed")
2063-            return task_dicts, list_id
2064:        except Exception:
2065-            logger.debug("task store fetch failed", exc_info=True)
2245-            return
2246:        except Exception as exc:
2247-            logger.warning(f"{task_name} failed after cancellation: {exc}", exc_info=True)
2317-                raise
2318:            except Exception:
2319-                if profiler is not None:
2337-                    raise
2338:                except Exception as exc:
2339-                    logger.debug(
2365-                    raise
2366:                except Exception:
2367-                    logger.debug("startup status refresh failed", exc_info=True)
comate_cli/terminal_agent/update_check.py
58-                )
59:            except Exception:
60-                logger.debug(
164-                return True
165:    except Exception:
166-        pass
246-            raise
247:        except Exception:
248-            if profiler is not None:
252-        raise
253:    except Exception:
254-        active_logger.debug(f"update check failed (source={source_label})", exc_info=True)
268-            )
269:    except Exception:
270-        active_logger.debug(
443-            )
444:    except Exception:
445-        logger.debug(
comate_cli/terminal_agent/tool_result_formatters.py
73-        return json.dumps(value, ensure_ascii=False, indent=2, default=str)
74:    except Exception:
75-        return str(value)
205-            parsed = parser(stripped)
206:        except Exception:
207-            continue
484-        )
485:    except Exception:
486-        logger.debug("failed to build syntax highlighter for diff", exc_info=True)
492-        style = raw_style if isinstance(raw_style, Style) else Style.parse(str(raw_style))
493:    except Exception:
494-        return None
516-        highlighted = syntax.highlight(code)
517:    except Exception:
518-        logger.debug("failed to highlight diff line", exc_info=True)
comate_cli/terminal_agent/logging_adapter.py
207-
208:        except Exception:
209-            self.handleError(record)
273-                handler.removeFilter(log_filter)
274:            except Exception:
275-                continue
279-                self._root_logger.removeHandler(handler)
280:            except Exception:
281-                continue
283-                handler.close()
284:            except Exception:
285-                continue
302-        from comate_agent_sdk.agent.settings import USER_SETTINGS_PATH, load_settings_file
303:    except Exception:
304-        return ""
308-            cfg = load_settings_file(path)
309:        except Exception:
310-            return ""
415-            root.removeHandler(handler)
416:        except Exception:
417-            pass
422-            handler.close()
423:        except Exception:
424-            continue
comate_cli/terminal_agent/plugins/marketplace_install_view.py
168-            raise
169:        except Exception as exc:
170-            self._error_message = str(exc)
194-                width = app.output.get_size().columns
195:            except Exception:
196-                pass
comate_cli/terminal_agent/event_renderer.py
490-            return max(1, int(self._stream_staging_budget_cb()))
491:        except Exception:
492-            return 20
2013-                        plan_content = Path(plan_path).read_text(encoding="utf-8")
2014:                    except Exception:
2015-                        logger.warning("ExitPlanMode: Failed to read plan file %s", plan_path)
comate_cli/terminal_agent/app.py
101-            record_skip_until_next_version(info)
102:    except Exception:
103-        logger.debug("startup update prompt failed", exc_info=True)
119-        console.print(f"[{style}]{format_update_result_message(result, target=target)}[/]")
120:    except Exception:
121-        logger.debug("startup update result display failed", exc_info=True)
153-        profiler.mark("update_check.prompt_deferred")
154:    except Exception:
155-        logger.debug("startup background update handling failed", exc_info=True)
188-            raise
189:        except Exception:
190-            logger.debug("startup background update check failed", exc_info=True)
221-        get_client().flush()
222:    except Exception:
223-        pass
239-        logger.debug("SIGINT guard enabled for shutdown")
240:    except Exception as exc:
241-        logger.debug(f"Failed to enable SIGINT guard, fallback to unguarded shutdown: {exc}")
250-            logger.debug("SIGINT guard restored")
251:        except Exception as exc:
252-            logger.warning(f"Failed to restore SIGINT handler: {exc}", exc_info=True)
385-            await session.close()
386:    except Exception as exc:
387-        logger.warning(f"Session shutdown failed ({label}): {exc}", exc_info=True)
545-            profiler.mark("await_preload.done")
546:    except Exception as e:
547-        logger.debug(f"MCP init failed: {e}", exc_info=True)
640-        from comate_agent_sdk.llm.exceptions import ModelProviderError
641:    except Exception:
642-        return False
840-        status_bar.apply_config(statusline_store.load())
841:    except Exception:
842-        pass
876-            usage_line = _format_exit_usage_line(usage)
877:        except Exception as exc:
878-            logger.warning(
comate_cli/terminal_agent/status_bar.py
133-            self._mode = str(session.get_mode()).strip().lower() or "act"
134:        except Exception:
135-            self._mode = "act"
183-            return None
184:        except Exception:
185-            self._record_git_failure_backoff(reason="error", args=args)
276-            goal = getter()
277:        except Exception:
278-            return None
318-                utilization = float(getattr(ctx_info, "utilization_percent", 0.0))
319:            except Exception:
320-                return
327-            self._mode = str(self._session.get_mode()).strip().lower() or "act"
328:        except Exception:
329-            pass
376-                )
377:            except Exception:
378-                pass
388-            width = int(app.output.get_size().columns)
389:        except Exception:
390-            return cls._DEFAULT_TERMINAL_WIDTH
comate_cli/terminal_agent/windows_updater.py
228-        )
229:    except Exception:
230-        logger.debug("corrupt update result file discarded", exc_info=True)
comate_cli/terminal_agent/preflight.py
99-        write_user_settings_atomic(path=settings_path, data=merged)
100:    except Exception as exc:
101-        logger.exception("Failed to save pre-flight settings")
comate_cli/terminal_agent/print_mode.py
63-        usage = await get_usage()
64:    except Exception as exc:
65-        logger.warning("Print mode failed to collect usage: %s", exc, exc_info=True)
206-        raise
207:    except Exception as exc:
208-        logger.error("Print mode failed: %s", exc, exc_info=True)
comate_cli/terminal_agent/update_messages.py
217-        lang, _encoding = locale.getlocale()
218:    except Exception:
219-        return "en"
comate_cli/terminal_agent/statusline/picker.py
109-                    live_data[k] = v
110:            except Exception:
111-                pass
comate_cli/terminal_agent/rpc_stdio.py
162-            session_id = await self._wait_for_init_session_id()
163:        except Exception as exc:
164-            await self._send(
231-            _ = await self._session.send(user_input)
232:        except Exception as exc:
233-            self._clear_active_prompt(result_future)
295-            raise
296:        except Exception as exc:
297-            logger.exception("rpc event pump failed")
332-            await self._send(build_success_response(request_id, result))
333:        except Exception as exc:
334-            await self._send(
350-            self._session.run_controller.interrupt("rpc_cancel")
351:        except Exception as exc:
352-            logger.warning(f"failed to interrupt active prompt: {exc}", exc_info=True)
413-            raw_line = sys.stdin.readline()
414:        except Exception as exc:
415-            logger.exception("rpc stdin read failed")
comate_cli/terminal_agent/resume_selector.py
29-        transcript_path = get_transcript_path(info.session_id, cwd=info.cwd)
30:    except Exception as exc:
31-        logger.debug(f"is_resumable: path resolve failed session={info.session_id} error={exc}")
36-        transcript_data = load_transcript_file(transcript_path)
37:    except Exception as exc:
38-        logger.debug(f"is_resumable: transcript load failed session={info.session_id} error={exc}")
comate_cli/terminal_agent/plugins/tabs/errors_tab.py
310-            logger.info("ErrorsTab._do_retry: successfully loaded %s", plugin_key)
311:        except Exception as exc:
312-            self._status_message = f"Failed: {exc}"
comate_cli/main.py
57-            self._enabled = True
58:        except Exception as exc:
59-            logger.debug(f"Terminal guard disabled: failed to snapshot tty attrs: {exc}")
67-            return
68:        except Exception as exc:
69-            logger.warning(f"tty restore failed ({reason}): {exc}", exc_info=True)
78-            )
79:        except Exception as exc:
80-            logger.warning(f"stty sane fallback failed ({reason}): {exc}", exc_info=True)
115-            logger.debug("SIGINT is now ignored for final shutdown")
116:        except Exception as exc:
117-            logger.debug(f"Failed to switch SIGINT to SIG_IGN during shutdown: {exc}")
143-                )
144:        except Exception:
145-            pass
202-            log.addHandler(handler)
203:        except Exception:
204-            log.addHandler(logging.NullHandler())
comate_cli/terminal_agent/plugins/operation_state.py
137-            raise
138:        except Exception:
139-            logger.exception("plugin operation animation failed")
comate_cli/terminal_agent/plugins/tabs/marketplaces_tab.py
91-            marketplaces = self._registry.list_marketplaces()
92:        except Exception:
93-            logger.exception("Failed to load marketplaces")
97-            installed = self._registry.list_installed()
98:        except Exception:
99-            logger.exception("Failed to load installed plugins")
108-                available_entries = list(self._mkt_mgr.list_available_plugins(name))
109:            except Exception:
110-                logger.exception("Failed to load available plugins for marketplace %s", name)
608-            logger.info("MarketplacesTab._do_add: added %s successfully", repo)
609:        except Exception as exc:
610-            self._status_message = f"Failed to add {repo}: {exc}"
622-            logger.info("MarketplacesTab._do_update: updated %s successfully", name)
623:        except Exception as exc:
624-            self._status_message = f"Failed to update {name}: {exc}"
637-            logger.info("MarketplacesTab._do_remove: removed %s successfully", name)
638:        except Exception as exc:
639-            self._status_message = f"Failed to remove {name}: {exc}"
comate_cli/terminal_agent/plugins/tabs/discover_tab.py
102-            available = self._mkt_mgr.list_all_available_plugins()
103:        except Exception:
104-            logger.exception("Failed to load available plugins")
108-            installed = self._registry.list_installed()
109:        except Exception:
110-            logger.exception("Failed to load installed plugins")
584-            logger.info("DiscoverTab._do_install: installed %s successfully", plugin_key)
585:        except Exception as exc:
586-            self._detail_actions = ["Retry", "Back"]
comate_cli/terminal_agent/tool_view.py
50-        return result
51:    except Exception:
52-        return path_str
226-        content = json.dumps(value, ensure_ascii=False, separators=(",", ":"))
227:    except Exception:
228-        content = str(value)
comate_cli/terminal_agent/plugins/tabs/installed_tab.py
94-            installed = self._registry.list_installed()
95:        except Exception:
96-            logger.exception("Failed to load installed plugins")
504-            )
505:        except Exception as exc:
506-            logger.warning(
642-                msg = f"Enabled: {name}"
643:        except Exception as exc:
644-            msg = f"Failed: {exc}"
720-            logger.info("InstalledTab._do_uninstall: uninstalled %s successfully", plugin_key)
721:        except Exception as exc:
722-            self._detail_actions = ["Retry", "Back"]
743-            logger.info("InstalledTab._do_update: updated %s successfully", plugin_key)
744:        except Exception as exc:
745-            self._detail_actions = ["Retry", "Back"]
comate_cli/terminal_agent/resume_picker.py
302-            term_width = get_app().output.get_size().columns
303:        except Exception:
304-            term_width = 120
347-            search_mode = bool(has_focus(self._search_buffer)())
348:        except Exception:
349-            search_mode = False
414-            visible_rows = self._item_list_window.render_info.window_height
415:        except Exception:
416-            visible_rows = 15
comate_cli/terminal_agent/recap/controller.py
123-            raise
124:        except Exception:
125-            logger.warning("idle recap controller failed", exc_info=True)
comate_cli/terminal_agent/markdown_render.py
128-        return rendered if rendered.plain else Text(str(content).strip("\n"))
129:    except Exception:
130-        return Text(str(content).strip("\n"))
comate_cli/terminal_agent/tui_parts/mcp_connecting_view.py
97-            raise
98:        except Exception as exc:
99-            self._on_done(False, str(exc))
112-                width = app.output.get_size().columns
113:            except Exception:
114-                pass
comate_cli/terminal_agent/tui_parts/history_sync.py
64-            await run_in_terminal(_clear_and_print_logo, in_executor=True)
65:        except Exception as exc:
66-            logger.warning(
comate_cli/terminal_agent/tui_parts/input_behavior.py
270-            queued_keys = tuple(event.key_processor.input_queue)
271:        except Exception:
272-            return False
comate_cli/terminal_agent/tui_parts/key_bindings.py
35-                await run_transcript_viewer_async(entries=entries, records=records)
36:        except Exception as exc:
37-            logger.warning("transcript viewer error", exc_info=True)
comate_cli/terminal_agent/tui_parts/commands.py
108-            self._refresh_layers()
109:        except Exception as exc:
110-            logger.exception("Failed to cycle mode")
356-                await result
357:        except Exception:
358-            logger.exception("Failed to refresh status bar after /goal")
429-                terminal_width = int(width_fn())
430:            except Exception:
431-                terminal_width = None
539-            user_path = scope_mcp_path(scope="user", project_root=project_root).expanduser()
540:        except Exception as exc:
541-            self._append_slash_command_result(
667-                terminal_width = int(width_fn())
668:            except Exception:
669-                terminal_width = None
726-                return
727:            except Exception:
728-                logger.exception("MCP list refresh task failed")
777-                ok = bool(update_fn(new_options))
778:            except Exception:
779-                logger.exception("MCP list refresh update failed")
1333-            return
1334:        except Exception as exc:
1335-            logger.exception("custom slash command rendering failed")
1378-            result = await self._session.compact_context_manual()
1379:        except Exception as exc:
1380-            logger.exception("manual compaction failed")
1391-                await self._status_bar.refresh()
1392:            except Exception:
1393-                logger.exception("Failed to refresh status bar after /compact")
1506-            await run_in_terminal(_clear_and_print_logo, in_executor=True)
1507:        except Exception as exc:
1508-            logger.warning(
1516-            await self._status_bar.refresh()
1517:        except Exception:
1518-            logger.exception("Failed to refresh status bar after /clear")
1575-            snapshot = store.load()
1576:        except Exception as exc:
1577-            logger.error("config.store.load 失败: %s", exc)
1616-            config = store.load()
1617:        except Exception as exc:
1618-            logger.error("statusline.store.load 失败: %s", exc)
1750-            self._invalidate()
1751:        except Exception as e:
1752-            self._append_slash_command_result(
1765-                self._invalidate()
1766:        except Exception:
1767-            logger.exception("Failed to update status bar model name")
1779-            llm_levels = self._session._agent._runtime_state.llm_levels
1780:        except Exception:
1781-            pass
1880-            )
1881:        except Exception as exc:
1882-            self._append_slash_command_result(
1985-            )
1986:        except Exception as exc:
1987-            logger.exception("rewind failed")
comate_cli/terminal_agent/tui_parts/render_panels.py
125-            return max(int(app.output.get_size().columns), 40)
126:        except Exception:
127-            return 100
134-            return max(int(app.output.get_size().rows), 1)
135:        except Exception:
136-            return 24
164-            snapshot = tuple(peek_queue())
165:        except Exception:
166-            logger.debug("failed to read queue preview snapshot", exc_info=True)
180-            snapshot = tuple(peek_queue())
181:        except Exception:
182-            logger.debug("failed to read queue id snapshot", exc_info=True)
comate_cli/terminal_agent/tui_parts/btw_view.py
175-                self._on_exit()
176:            except Exception:
177-                logger.warning("btw on_exit failed", exc_info=True)
204-                width = app.output.get_size().columns
205:            except Exception:
206-                pass
252-            from comate_agent_sdk.forked import run_forked_agent
253:        except Exception as exc:  # pragma: no cover - import safety net
254-            logger.warning("btw import run_forked_agent failed", exc_info=True)
275-            raise
276:        except Exception as exc:
277-            logger.warning("btw fork failed", exc_info=True)
311-                width = app.output.get_size().columns
312:            except Exception:
313-                pass

[Showing results with pagination = limit: 250]