fix: add full request as request context (#4422)

Co-authored-by: jamesgeorge007 <25279263+jamesgeorge007@users.noreply.github.com>
This commit is contained in:
Akash K 2024-10-10 18:11:58 +05:30 committed by GitHub
parent bb21b13471
commit 79bf0d0363
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 2 deletions

View File

@ -278,7 +278,10 @@ const getTabName = (tab: HoppTab<HoppTabDocument>) => {
const requestToRename = computed(() => {
if (!renameTabID.value) return null
const tab = tabs.getTabRef(renameTabID.value)
return getTabName(tab.value)
return tab.value.document.type === "request"
? tab.value.document.request
: null
})
const openReqRenameModal = (tabID?: string) => {

View File

@ -47,7 +47,11 @@ export class RequestSpotlightSearcherService extends StaticSpotlightSearcherServ
private readonly restTab = this.bind(RESTTabService)
private route = useRoute()
private isRESTPage = computed(() => this.route.name === "index")
private isRESTPage = computed(
() =>
this.route.name === "index" &&
this.restTab.currentActiveTab.value.document.type === "request"
)
private isGQLPage = computed(() => this.route.name === "graphql")
private isRESTOrGQLPage = computed(
() => this.isRESTPage.value || this.isGQLPage.value