Optimize observeThreadGuidanceFiles return type
I'll help you modify observeThreadGuidanceFiles to omit the content field and update the tests accordingly.
Now I'll modify the observeThreadGuidanceFiles function to return the type without the content field and update its implementation:
Now I need to update the implementation to map the resolved guidance files to exclude the content field:
Now I need to find the tests for this function:
Now I need to update the test expectations to not expect the content field. I can see that the tests are checking toMatchObject which should still pass if we just remove the content field from what gets returned. However, I need to ensure that the test expectations are updated properly.
Looking at the tests, I can see they primarily check for uri and type properties, so the main change needed is in the mock of resolveGuidanceFiles to not include content in the return value, and update any test assertions that might check for the content field.
Let me check if any tests are explicitly checking for the content field:
Good, the tests don't seem to be checking for the content field explicitly. Let me run the tests to see if they pass with my changes:
Great! The tests are passing. Now let me check for any other uses of observeThreadGuidanceFiles in the codebase to see if they need to be updated:
Let me check the worker usage to see if it needs to be updated:
Let me check what the threadGuidanceFiles method should return to see if there are any type expectations:
I need to check the webview API type definition to see if it needs to be updated:
I need to update the webview API type to match the new return type:
Now let me run a typecheck to ensure there are no type errors:
This error seems unrelated to my changes - it's about an AbortSignal issue. Let me run the tests to make sure my changes don't break anything:
Great! All tests are passing. Now let me run the full build check to make sure everything is working correctly: