Skip to content

Commit c6085ac

Browse files
authored
Merge pull request stackblitz-labs#713 from thecodacus/context-optimization-fix
fix: removed context optimization temporarily, to be moved to optional
2 parents c8edc94 + d88e76a commit c6085ac

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

app/lib/.server/llm/stream-text.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ type Dirent = File | Folder;
3838

3939
export type FileMap = Record<string, Dirent | undefined>;
4040

41-
function simplifyBoltActions(input: string): string {
41+
export function simplifyBoltActions(input: string): string {
4242
// Using regex to match boltAction tags that have type="file"
4343
const regex = /(<boltAction[^>]*type="file"[^>]*>)([\s\S]*?)(<\/boltAction>)/g;
4444

@@ -156,8 +156,9 @@ export async function streamText(props: {
156156

157157
return { ...message, content };
158158
} else if (message.role == 'assistant') {
159-
let content = message.content;
160-
content = simplifyBoltActions(content);
159+
const content = message.content;
160+
161+
// content = simplifyBoltActions(content);
161162

162163
return { ...message, content };
163164
}

app/utils/constants.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,6 @@ async function getOpenRouterModels(): Promise<ModelInfo[]> {
462462
}
463463

464464
async function getLMStudioModels(_apiKeys?: Record<string, string>, settings?: IProviderSetting): Promise<ModelInfo[]> {
465-
466465
try {
467466
const baseUrl = settings?.baseUrl || import.meta.env.LMSTUDIO_API_BASE_URL || 'http://localhost:1234';
468467
const response = await fetch(`${baseUrl}/v1/models`);

0 commit comments

Comments
 (0)