feat: mount LLMQueryPanel in SearchView and add auto-run setting to SettingsView
This commit is contained in:
parent
53ede9a4c5
commit
37e34ac820
2 changed files with 30 additions and 0 deletions
|
|
@ -79,6 +79,9 @@
|
||||||
</form>
|
</form>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
|
<!-- LLM query builder panel — only shown when feature flag is active -->
|
||||||
|
<LLMQueryPanel v-if="session.features.llm_query_builder" />
|
||||||
|
|
||||||
<div class="search-body">
|
<div class="search-body">
|
||||||
<!-- Mobile filter toggle -->
|
<!-- Mobile filter toggle -->
|
||||||
<button
|
<button
|
||||||
|
|
@ -450,6 +453,7 @@ import { useSavedSearchesStore } from '../stores/savedSearches'
|
||||||
import { useSessionStore } from '../stores/session'
|
import { useSessionStore } from '../stores/session'
|
||||||
import { useBlocklistStore } from '../stores/blocklist'
|
import { useBlocklistStore } from '../stores/blocklist'
|
||||||
import ListingCard from '../components/ListingCard.vue'
|
import ListingCard from '../components/ListingCard.vue'
|
||||||
|
import LLMQueryPanel from '../components/LLMQueryPanel.vue'
|
||||||
|
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const store = useSearchStore()
|
const store = useSearchStore()
|
||||||
|
|
|
||||||
|
|
@ -79,6 +79,30 @@
|
||||||
|
|
||||||
<p v-if="prefs.error" class="settings-error" role="alert">{{ prefs.error }}</p>
|
<p v-if="prefs.error" class="settings-error" role="alert">{{ prefs.error }}</p>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<section class="settings-section">
|
||||||
|
<h2 class="settings-section-title">Search</h2>
|
||||||
|
|
||||||
|
<label class="settings-toggle">
|
||||||
|
<div class="settings-toggle-text">
|
||||||
|
<span class="settings-toggle-label">Auto-run after Build with AI</span>
|
||||||
|
<span class="settings-toggle-desc">
|
||||||
|
When enabled, Snipe starts searching immediately after the AI fills in your filters.
|
||||||
|
Disable to review the filters before searching.
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<button
|
||||||
|
class="toggle-btn"
|
||||||
|
:class="{ 'toggle-btn--on': llmAutoRun }"
|
||||||
|
:aria-pressed="String(llmAutoRun)"
|
||||||
|
aria-label="Run search automatically after AI builds filters"
|
||||||
|
@click="setLLMAutoRun(!llmAutoRun)"
|
||||||
|
>
|
||||||
|
<span class="toggle-btn__track" />
|
||||||
|
<span class="toggle-btn__thumb" />
|
||||||
|
</button>
|
||||||
|
</label>
|
||||||
|
</section>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -87,10 +111,12 @@ import { ref, watch } from 'vue'
|
||||||
import { useTrustSignalPref } from '../composables/useTrustSignalPref'
|
import { useTrustSignalPref } from '../composables/useTrustSignalPref'
|
||||||
import { useSessionStore } from '../stores/session'
|
import { useSessionStore } from '../stores/session'
|
||||||
import { usePreferencesStore } from '../stores/preferences'
|
import { usePreferencesStore } from '../stores/preferences'
|
||||||
|
import { useLLMQueryBuilder } from '../composables/useLLMQueryBuilder'
|
||||||
|
|
||||||
const { enabled: trustSignalEnabled, setEnabled } = useTrustSignalPref()
|
const { enabled: trustSignalEnabled, setEnabled } = useTrustSignalPref()
|
||||||
const session = useSessionStore()
|
const session = useSessionStore()
|
||||||
const prefs = usePreferencesStore()
|
const prefs = usePreferencesStore()
|
||||||
|
const { autoRun: llmAutoRun, setAutoRun: setLLMAutoRun } = useLLMQueryBuilder()
|
||||||
|
|
||||||
// Local input buffer for BYOK ID — synced from store, saved on blur/enter
|
// Local input buffer for BYOK ID — synced from store, saved on blur/enter
|
||||||
const byokInput = ref(prefs.affiliateByokId)
|
const byokInput = ref(prefs.affiliateByokId)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue