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
1 change: 0 additions & 1 deletion src/extension/prompts/node/panel/toolCalling.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,6 @@ const toolsCalledInParallel = new Set<ToolName>([
ToolName.GetErrors,
ToolName.GetScmChanges,
ToolName.GetNotebookSummary,
ToolName.ReadCellOutput,
ToolName.InstallExtension,
ToolName.FetchWebPage,
]);
Expand Down
4 changes: 2 additions & 2 deletions src/extension/tools/node/runNotebookCellTool.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ export class RunNotebookCellOutput extends PromptElement<IRunNotebookCellOutputP
|| item.mime === 'application/vnd.code.notebook.stderr'
|| item.mime === 'application/json');
if (textItem) {
if (getCharLimit(textItem.data.byteLength) > sizing.tokenBudget / this.props.sizeLimitRatio) {
if (textItem.data.byteLength > getCharLimit(sizing.tokenBudget / this.props.sizeLimitRatio)) {
return <Tag name={`cell-output`} attrs={{ mimeType: textItem.mime }}>
Output {index + 1}: Output is too large to be used as context in the language model, but the user should be able to see it in the notebook.<br />
<br />
Expand All @@ -394,7 +394,7 @@ export class RunNotebookCellOutput extends PromptElement<IRunNotebookCellOutputP
</Tag>;
}

const largeOutput = output.items.find((item) => getCharLimit(item.data.byteLength) > sizing.tokenBudget / this.props.sizeLimitRatio);
const largeOutput = output.items.find((item) => item.data.byteLength > getCharLimit(sizing.tokenBudget / this.props.sizeLimitRatio));
if (largeOutput) {
return <Tag name={`cell-output`} attrs={{ mimeType: largeOutput.mime }}>
Output {index + 1}: Output is too large to be used as context in the language model, but the user should be able to see it in the notebook.<br />
Expand Down