Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions packages/components/src/components/chat-search/ProxySettings.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<template>
<div>
<h2>Proxy Settings</h2>

<p v-if="hasHttpProxy">HTTP Proxy is set</p>
<p v-if="hasHttpsProxy">HTTPS Proxy is set</p>
<p v-else>No HTTP/HTTPS Proxy Settings found</p>
</div>
</template>
<script>
export default {
name: 'ProxySettings',
props: {
proxySettings: {
type: Object,
},
},
computed: {
hasHttpProxy() {
return !!this.proxySettings.http_proxy;
},
hasHttpsProxy() {
return !!this.proxySettings.https_proxy;
},
},
};
</script>
24 changes: 24 additions & 0 deletions packages/components/src/pages/ChatSearch.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
:base-url="baseUrl"
:model="model"
/>
<v-proxy-settings v-if="hasProxySettings" :proxy-settings="proxySettings" />
</v-chat>
</div>
<div
Expand All @@ -48,20 +49,36 @@ import VChat from '@/components/chat/Chat.vue';
import VContextStatus from '@/components/chat-search/ContextStatus.vue';
import VContext from '@/components/chat-search/Context.vue';
import VLlmConfiguration from '@/components/chat-search/LlmConfiguration.vue';
import VProxySettings from '@/components/chat-search/ProxySettings.vue';
import AppMapRPC from '@/lib/AppMapRPC';
import authenticatedClient from '@/components/mixins/authenticatedClient';
import type { ITool, CodeSelection } from '@/components/chat/Chat.vue';
import type { PinEvent } from '@/components/chat/PinEvent';

import debounce from '@/lib/debounce';

// type ProxySettings = {
// http_proxy: string | undefined;
// https_proxy: string | undefined;
// vscode: {
// 'http.proxy': string | undefined;
// 'https.proxy': string | undefined;
// };
// env: {
// http_proxy: string | undefined;
// https_proxy: string | undefined;
// no_proxy: string | undefined;
// };
// };

export default {
name: 'v-chat-search',
components: {
VChat,
VContext,
VContextStatus,
VLlmConfiguration,
VProxySettings,
},
mixins: [authenticatedClient],
props: {
Expand Down Expand Up @@ -89,6 +106,10 @@ export default {
targetAppmapFsPath: {
type: String,
},
proxySettings: {
type: Object,
default: () => ({}),
},
appmapYmlPresent: Boolean,
mostRecentAppMaps: Array,
disableLlmConfig: {
Expand Down Expand Up @@ -244,6 +265,9 @@ export default {
this.appmapRpcFn ? { request: this.appmapRpcFn } : this.appmapRpcPort || 30101
);
},
hasProxySettings() {
return this.proxySettings?.http_proxy || this.proxySettings?.https_proxy;
},
},
methods: {
// This converts the old search context into the new context format
Expand Down