Skip to content

Commit 2877c61

Browse files
committed
minor reverse
1 parent 16ef3ed commit 2877c61

File tree

2 files changed

+5
-11
lines changed

2 files changed

+5
-11
lines changed

libs/remix-ai-core/src/inferencers/mcp/toolApiGenerator.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,6 @@ const modified = fileContent.replace('old', 'new');
2525
const compiled = await callMCPTool('solidity_compile', { file: 'contract.sol' });
2626
const deployed = await callMCPTool('deploy_contract', { contractName: 'MyToken' });
2727
28-
// Multiple tasks 2
29-
const fileContent = await callMCPTool('file_read', { path:'contract.sol' });
30-
const content = JSON.parse(fileContent.content[0].text).content
31-
const updatedContent = fileContent.replace('contract Subscription', 'contract MySubscriptionContract');
32-
await callMCPTool('file_write', { path: 'ccontract.sol', content: updatedContent });
33-
3428
3529
// With loops for batch operations
3630
const files = ['contracts/Token.sol', 'contracts/NFT.sol', 'contracts/DAO.sol'];

libs/remix-ai-core/src/inferencers/remote/remoteInference.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ export class RemoteInferencer implements ICompletions, IGeneration {
2424
protected sanitizePromptByteSize(prompt: string, provider?: string): string {
2525
// Provider-specific max byte limits
2626
const providerLimits: Record<string, number> = {
27-
'mistralai': 80000,
28-
'anthropic': 80000,
29-
'openai': 80000
27+
'mistralai': 70000,
28+
'anthropic': 70000,
29+
'openai': 70000
3030
};
3131

32-
// Get max bytes based on provider, default to 80KB
33-
const maxBytes = provider ? (providerLimits[provider.toLowerCase()] || 80000) : 80000;
32+
// Get max bytes based on provider, default to 70KB
33+
const maxBytes = provider ? (providerLimits[provider.toLowerCase()] || 70000) : 70000;
3434

3535
const encoder = new TextEncoder();
3636
const promptBytes = encoder.encode(prompt); // rough estimation, real size might be 10% more

0 commit comments

Comments
 (0)