Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update NativeWebview title only if the title changes (sourcegraph#5861)
`cody-agent-trace.json` looks like this now: ``` [Trace - 01:03:47 PM] Received notification 'webview/setTitle' Params: { "handle": "native-webview-panel-df3675ed-b3d7-4051-94ff-78a569945443", "title": "Explain what @src/main/ja..." } [Trace - 01:03:47 PM] Received notification 'webview/setTitle' Params: { "handle": "native-webview-panel-df3675ed-b3d7-4051-94ff-78a569945443", "title": "Explain what @src/main/ja..." } [Trace - 01:03:47 PM] Received notification 'webview/setTitle' Params: { "handle": "native-webview-panel-df3675ed-b3d7-4051-94ff-78a569945443", "title": "Explain what @src/main/ja..." } [Trace - 01:03:47 PM] Received notification 'webview/setTitle' Params: { "handle": "native-webview-panel-df3675ed-b3d7-4051-94ff-78a569945443", "title": "Explain what @src/main/ja..." } [Trace - 01:03:47 PM] Received notification 'webview/setTitle' Params: { "handle": "native-webview-panel-df3675ed-b3d7-4051-94ff-78a569945443", "title": "Explain what @src/main/ja..." } [Trace - 01:03:47 PM] Received notification 'webview/setTitle' Params: { "handle": "native-webview-panel-df3675ed-b3d7-4051-94ff-78a569945443", "title": "Explain what @src/main/ja..." } [Trace - 01:03:47 PM] Received notification 'webview/setTitle' Params: { "handle": "native-webview-panel-df3675ed-b3d7-4051-94ff-78a569945443", "title": "Explain what @src/main/ja..." } [Trace - 01:03:47 PM] Received notification 'webview/setTitle' Params: { "handle": "native-webview-panel-df3675ed-b3d7-4051-94ff-78a569945443", "title": "Explain what @src/main/ja..." } [Trace - 01:03:47 PM] Received notification 'webview/setTitle' Params: { "handle": "native-webview-panel-df3675ed-b3d7-4051-94ff-78a569945443", "title": "Explain what @src/main/ja..." } [Trace - 01:03:47 PM] Received notification 'webview/setTitle' Params: { "handle": "native-webview-panel-df3675ed-b3d7-4051-94ff-78a569945443", "title": "Explain what @src/main/ja..." } [Trace - 01:03:47 PM] Received notification 'webview/setTitle' Params: { "handle": "native-webview-panel-df3675ed-b3d7-4051-94ff-78a569945443", "title": "Explain what @src/main/ja..." } ``` I think there is no need to send the notification if the title does not change actually. ## Test plan 1. Run IDE. 2. Run Explain a few times. 3. Review `cody-agent-trace.json` The number of notifications should be reasonable. <!-- Required. See https://docs-legacy.sourcegraph.com/dev/background-information/testing_principles. --> ## Changelog <!-- OPTIONAL; info at https://www.notion.so/sourcegraph/Writing-a-changelog-entry-dd997f411d524caabf0d8d38a24a878c -->
- Loading branch information