refactor(qr-code): replace react-qr-code with react-qrcode-logo

- Updated package.json and pnpm-lock.yaml to use react-qrcode-logo v3.0.0
- Modified ExpoQrModal.tsx to use the new QRCode component with enhanced styling and logo support
- Removed filtering of lock.json files in useChatHistory.ts and stream-text.ts for consistency
- Updated mobile app instructions in prompts.ts to ensure clarity and alignment with best practices
This commit is contained in:
KevIsDev
2025-04-23 16:43:01 +01:00
parent f06dd8a7b1
commit 02401b90aa
6 changed files with 194 additions and 230 deletions

View File

@@ -114,16 +114,25 @@ export async function streamText(props: {
}) ?? getSystemPrompt();
if (files && contextFiles && contextOptimization) {
const codeContext = createFilesContext(contextFiles, true);
const filePaths = getFilePaths(files);
// Filter out package-lock.json from the files used for context
const filteredFiles = Object.fromEntries(
Object.entries(files).filter(([filePath]) => !filePath.endsWith('package-lock.json')),
);
const filteredContextFiles = Object.fromEntries(
Object.entries(contextFiles).filter(([filePath]) => !filePath.endsWith('package-lock.json')),
);
// Use the filtered maps to generate context
const codeContext = createFilesContext(filteredContextFiles, true); // Uses filtered contextFiles
const filePaths = getFilePaths(filteredFiles); // Uses filtered files
systemPrompt = `${systemPrompt}
Below are all the files present in the project:
Below are all the files present in the project (excluding package-lock.json):
---
${filePaths.join('\n')}
---
Below is the artifact containing the context loaded into context buffer for you to have knowledge of and might need changes to fullfill current user request.
Below is the artifact containing the context loaded into context buffer for you to have knowledge of and might need changes to fullfill current user request (excluding package-lock.json).
CONTEXT BUFFER:
---
${codeContext}