Closed kgilpin closed 1 month ago
Title: Implement Auto-Refresh for Pinned Files on Changes
Problem: When a user pins a file and makes subsequent changes to that file, the changes are not reflected in Navie. The pinned file retains its original content and does not update to show the latest edits, causing discrepancies between the actual file state and its representation in the pinned section.
Analysis: The current implementation pins the file with its existing content at the time of pinning and does not have a mechanism to update the pinned content when the file undergoes changes. To address this, we need to ensure that any modifications in the file are detected and the pinned content is refreshed accordingly. This may involve implementing a file watcher or similar mechanism to listen for changes in the filesystem and update the pinned content dynamically.
If we look at the existing code, the PinFileRequest
captures the file's content when pinned, but there's no logic to auto-update this content. The file pinning system should, therefore, include a feature to observe file changes and refresh the content in Navie.
Proposed Changes:
packages/components/src/lib/PinFileRequest.ts:
PinFileRequest
class to accommodate a mechanism (e.g., an event handler or callback) that can be triggered when the file content changes. Ensure that this mechanism can access the updated file content and is capable of refreshing the displayed pinned content.packages/components/src/components/chat/File.vue:
VContextContainer
when the file is changed.packages/components/src/components/chat/ContextContainer.vue:
v-file
and refresh the content displayed in the UI. This could be done through reactive properties that update when file changes are detected.File Monitoring:
fs.watch
or another appropriate mechanism. This utility can be initialized when a file is pinned and disposed of when the file is unpinned.Integration and Testing:
By implementing these changes, the system should dynamically refresh pinned files in Navie, aligning their representation with real-time file edits.
An alternative implementation, which seems simpler and more reliable, would be to incorporate the locations of pinned files into the requests sent to Navie.
:tada: This issue has been resolved in version @appland/navie-v1.33.1 :tada:
The release is available on:
@appland/navie-v1.33.1
@appland/navie-v1.33.1
Your semantic-release bot :package::rocket:
:tada: This issue has been resolved in version @appland/components-v4.39.2 :tada:
The release is available on:
@appland/components-v4.39.2
@appland/components-v4.39.2
Your semantic-release bot :package::rocket:
:tada: This issue has been resolved in version @appland/appmap-v3.171.2 :tada:
The release is available on:
@appland/appmap-v3.171.2
@appland/appmap-v3.171.2
Your semantic-release bot :package::rocket:
When I Pin a file and then change that file, my changes are not picked up by Navie. The file is Pinned with the original file content, and doesn't seem to be refreshed when I edit the file.