mirror of
https://github.com/openswarm-ai/openswarm.git
synced 2026-09-06 09:47:44 +02:00
[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:
@@ -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 && (() => {
|
||||
|
||||
Reference in New Issue
Block a user