Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion agentic/src/nodes/analysisIssueFix.ts
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,10 @@ If you have any additional details or steps that need to be performed, put it he
);

if (!response) {
this.logger.silly("AnalysisIssueFix returned undefined response");
this.logger.warn(
`AnalysisIssueFix: LLM returned no response for file "${fileName}". ` +
`This may indicate a model provider configuration issue.`,
);
return {
outputAdditionalInfo: undefined,
outputUpdatedFile: undefined,
Expand Down Expand Up @@ -460,6 +463,9 @@ ${state.inputAllReasoning}`,
);

if (!response) {
this.logger.warn(
"SummarizeHistory: LLM returned no response. This may indicate a model provider configuration issue.",
);
return {
summarizedHistory: "",
iterationCount: state.iterationCount,
Expand Down
12 changes: 9 additions & 3 deletions agentic/src/nodes/diagnosticsIssueFix.ts
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,9 @@ Instructions for Agent B to solve Issue 3, Issue 4, etc. (mention specific issue
);

if (!response) {
this.logger.silly("PlanFixes returned undefined response");
this.logger.warn(
"PlanFixes: LLM returned no response. This may indicate a model provider configuration issue.",
);
return {
plannerOutputNominatedAgents: [],
iterationCount: state.iterationCount,
Expand Down Expand Up @@ -401,7 +403,9 @@ ${
);

if (!response) {
this.logger.silly("FixGeneralIssues returned undefined response");
this.logger.warn(
"FixGeneralIssues: LLM returned no response. This may indicate a model provider configuration issue.",
);
return {
messages: [new AIMessage(`DONE`)],
outputModifiedFilesFromGeneralFix: [],
Expand Down Expand Up @@ -471,7 +475,9 @@ ${state.inputInstructionsForGeneralFix}
);

if (!response) {
this.logger.silly("FixJavaDependencyIssues returned undefined response");
this.logger.warn(
"FixJavaDependencyIssues: LLM returned no response. This may indicate a model provider configuration issue.",
);
return {
messages: [new AIMessage(`DONE`)],
outputModifiedFilesFromGeneralFix: [],
Expand Down
37 changes: 37 additions & 0 deletions webview-ui/src/hooks/useContainerWidth.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import { useState, useEffect, useRef, type RefObject } from "react";

const DEFAULT_MIN_WIDTH = 350;

/**
* Monitors the width of a container element via ResizeObserver and reports
* whether the container is narrower than the given minimum.
*/
export function useContainerWidth(minWidth = DEFAULT_MIN_WIDTH): {
containerRef: RefObject<HTMLDivElement>;
isTooNarrow: boolean;
width: number;
} {
const containerRef = useRef<HTMLDivElement>(null);
const [width, setWidth] = useState(0);

useEffect(() => {
const el = containerRef.current;
if (!el) {
return;
}

const observer = new ResizeObserver((entries) => {
for (const entry of entries) {
const w = entry.contentBoxSize?.[0]?.inlineSize ?? entry.contentRect.width;
setWidth(w);
}
});

observer.observe(el);
setWidth(el.clientWidth);

return () => observer.disconnect();
}, []);

return { containerRef, isTooNarrow: width > 0 && width < minWidth, width };
}
Loading
Loading