fix: VAANI and DOSH now extract active file instead of dumping full workspace#2
Open
AneeshVRao wants to merge 2 commits intomainfrom
Open
fix: VAANI and DOSH now extract active file instead of dumping full workspace#2AneeshVRao wants to merge 2 commits intomainfrom
AneeshVRao wants to merge 2 commits intomainfrom
Conversation
- lambda_trigger: Upload audio to S3 before async invoke to avoid 256KB payload limit - lambda_trigger: Pass audio_s3_key instead of audio_base64 in processor payload - lambda_processor: Accept audio_s3_key (backward-compatible with audio_base64) - lambda_processor: Auto-detect audio format (MP3/OGG/FLAC/WAV) from file header bytes - lambda_processor: Set MediaFormat dynamically from S3 key extension - lambda_processor: Move import re to top level (was duplicated in 3 functions) - lambda_processor: Add fallback return in karma_kavach to prevent None return
…orkspace - vaani_srijan() now calls extract_active_file() to isolate the open file before building the prompt, preventing all workspace files being returned - dosh_drishti() now accepts active_filename and uses extract_active_file() for focused debugging context - Added .gitignore to exclude __pycache__
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
+When a user asked VAANI to generate code (e.g. 'Python mein factorial function likho'), the AI returned all workspace files concatenated with the new code, instead of just the requested function.
+
+## Root Cause
+-
vaani_srijan()received the entire workspace blob ascode_contextand the prompt said 'Return the COMPLETE updated file — keep all existing code intact'+-
dosh_drishti()had the same issue — full workspace passed for debugging instead of just the open file+-
extract_active_file()already existed (used by GYAAN and KARMA) but was not called by VAANI or DOSH+
+## Fix
+1. vaani_srijan() — now calls
extract_active_file(code_context, active_filename)to isolate only the open file before building the prompt+2. dosh_drishti() — now accepts
active_filenameparameter and usesextract_active_file()to createfocused_contextinstead of rawcode_context+3. lambda_handler — updated to pass
active_filenametodosh_drishti()+4. Added
.gitignoreto exclude__pycache__/+
+## Testing
+-
py_compilepasses with zero errors+- Logic verified: when active file is open, only that file's content goes to the AI prompt