Skip to content

Commit

Permalink
Authenticate the chat search frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
dustinbyrne committed Jan 2, 2024
1 parent b9b28d0 commit f362bcd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/webviews/chatSearchWebview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import IndexProcessWatcher from '../services/indexProcessWatcher';
import { ProcessId } from '../services/processWatcher';
import viewSource from './viewSource';
import { Telemetry } from '../telemetry';
import { getApiKey } from '../authentication';
import ExtensionSettings from '../configuration/extensionSettings';

export default class ChatSearchWebview {
public readonly panels = new Set<vscode.WebviewPanel>();
Expand Down Expand Up @@ -93,6 +95,8 @@ export default class ChatSearchWebview {
type: 'initChatSearch',
appmapRpcPort,
question,
apiUrl: ExtensionSettings.apiUrl,
apiKey: await getApiKey(false),
});

break;
Expand Down
2 changes: 2 additions & 0 deletions web/src/chatSearchView.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ export default function mountChatSearchView() {
props: {
appmapRpcPort: initialData.appmapRpcPort,
question: initialData.question,
apiUrl: initialData.apiUrl,
apiKey: initialData.apiKey,
},
});
},
Expand Down

0 comments on commit f362bcd

Please sign in to comment.