Skip to content

Commit

Permalink
feat: Specify saved filters for ChatSearch (Explain) view
Browse files Browse the repository at this point in the history
  • Loading branch information
kgilpin committed Jan 10, 2024
1 parent bb7e28a commit e0662c5
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
12 changes: 11 additions & 1 deletion packages/components/src/pages/ChatSearch.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,13 @@
</div>
</div>
</div>
<v-app-map v-if="selectedSearchResult" :allow-fullscreen="true" ref="vappmap" class="appmap">
<v-app-map
v-if="selectedSearchResult"
:allow-fullscreen="true"
:saved-filters="savedFilters"
ref="vappmap"
class="appmap"
>
</v-app-map>
<div v-else class="appmap-empty"></div>
<v-accordion class="diagnostics" :open="showDiagnostics" @toggle="toggleDiagonstics">
Expand Down Expand Up @@ -116,6 +122,10 @@ export default {
appmapRpcFn: {
type: Function,
},
savedFilters: {
type: Array,
default: () => [],
},
},
data() {
return {
Expand Down
12 changes: 12 additions & 0 deletions packages/components/src/stories/ChatSearch.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import './scss/vscode.scss';
import orderData from './data/scenario.json';
import petclinicData from './data/java_scenario.json';
import longPackageData from './data/long-package.appmap.json';
import savedFilters from './data/saved_filters.js';

export default {
title: 'Pages/ChatSearch',
Expand All @@ -23,6 +24,12 @@ export const ChatSearchMock = (args, { argTypes }) => ({
template: `<v-chat-search v-bind="$props"></v-chat-search>`,
});

export const ChatSearchMockWithFilters = (args, { argTypes }) => ({
props: Object.keys(argTypes),
components: { VChatSearch },
template: `<v-chat-search v-bind="$props"></v-chat-search>`,
});

export const ChatSearchMockSearchPrepopulated = (args, { argTypes }) => ({
props: Object.keys(argTypes),
components: { VChatSearch },
Expand Down Expand Up @@ -144,6 +151,11 @@ ChatSearchMock.args = {
appmapRpcFn: mockRpc,
};

ChatSearchMockWithFilters.args = {
appmapRpcFn: mockRpc,
savedFilters,
};

ChatSearchMockSearchPrepopulated.args = {
appmapRpcFn: mockRpc,
question: 'How does password reset work?',
Expand Down

0 comments on commit e0662c5

Please sign in to comment.