[eric] windows 1.1.51 diag: render logs on every ChatInputToolbar child (ModeControl, ModelPickerMenu, ThinkingLevelControl, ToolbarActions) so the next 0xC0000005 crash narrows from "ChatInputToolbar last" to the exact toolbar child that commits before the segfault

This commit is contained in:
Eric
2026-05-25 21:27:14 -07:00
parent 06e7c54f57
commit e2ea5e03cf
7 changed files with 31 additions and 1 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "openswarm",
"version": "1.1.50",
"version": "1.1.51",
"description": "OpenSwarm — AI Agent Orchestrator",
"author": "openswarm-ai",
"main": "main.js",
@@ -44,6 +44,12 @@ interface Props {
}
export const ModelPickerMenu: React.FC<Props> = (props) => {
// eslint-disable-next-line no-console
console.log('[diag][ModelPickerMenu:render]', 'model=', props.model, 'open=', !!props.modelAnchor);
React.useEffect(() => {
// eslint-disable-next-line no-console
console.log('[diag][ModelPickerMenu:committed]');
});
const {
c, menuPaperProps, modelAnchor, setModelAnchor, model, onModelChange, onProviderChange,
modelSearchRef, modelSearch, setModelSearch, pushRecentModel, pushRecentSearch,
@@ -53,6 +53,10 @@ interface Props {
export const ChatInputToolbar: React.FC<Props> = (p) => {
// eslint-disable-next-line no-console
console.log('[diag][ChatInputToolbar:render]', p.sessionId);
React.useEffect(() => {
// eslint-disable-next-line no-console
console.log('[diag][ChatInputToolbar:committed]');
});
const {
c, modeConf, modesArr, mode, onModeChange, iconMap,
modeAnchor, setModeAnchor, modelAnchor, setModelAnchor, thinkingAnchor, setThinkingAnchor,
@@ -4,6 +4,8 @@ import Tooltip from '@mui/material/Tooltip';
import { formatTokenCount } from '../helpers';
export const ContextRing: React.FC<{ used: number; limit: number; accentColor: string; trackColor: string }> = ({ used, limit, accentColor, trackColor }) => {
// eslint-disable-next-line no-console
console.log('[diag][ContextRing:render]', 'used=', used, 'limit=', limit);
if (used === 0) return null;
const pct = Math.min((used / limit) * 100, 100);
const size = 20;
@@ -28,6 +28,12 @@ interface Props {
export const ModeControl: React.FC<Props> = ({
c, menuPaperProps, modeConf, modesArr, mode, onModeChange, iconMap, modeAnchor, setModeAnchor, setModelAnchor, allModelFlat, model,
}) => {
// eslint-disable-next-line no-console
console.log('[diag][ModeControl:render]', 'mode=', mode);
React.useEffect(() => {
// eslint-disable-next-line no-console
console.log('[diag][ModeControl:committed]');
});
return (
<>
<Box
@@ -23,6 +23,12 @@ interface Props {
export const ThinkingLevelControl: React.FC<Props> = ({
c, model, allModelFlat, thinkingLevel, onThinkingLevelChange, thinkingAnchor, setThinkingAnchor, menuPaperProps,
}) => {
// eslint-disable-next-line no-console
console.log('[diag][ThinkingLevelControl:render]', 'model=', model, 'level=', thinkingLevel);
React.useEffect(() => {
// eslint-disable-next-line no-console
console.log('[diag][ThinkingLevelControl:committed]');
});
const currentModel = allModelFlat.find((m: any) => m.value === model) as any;
if (!currentModel?.reasoning || !onThinkingLevelChange) return null;
const levels: Array<{ value: ThinkingLevel; label: string; desc: string }> = [
@@ -30,6 +30,12 @@ export const ToolbarActions: React.FC<Props> = ({
c, elementSelection, autoRunMode, ownerId, sessionId, generalFileInputRef,
addImageFiles, uploadAndAttachFiles, hasContent, disabled, isRunning, onStop, handleSend,
}) => {
// eslint-disable-next-line no-console
console.log('[diag][ToolbarActions:render]', sessionId, 'isRunning=', isRunning);
React.useEffect(() => {
// eslint-disable-next-line no-console
console.log('[diag][ToolbarActions:committed]');
});
return (
<>
{elementSelection && !autoRunMode && (() => {