mirror of
https://github.com/elder-plinius/P4RS3LT0NGV3.git
synced 2026-07-25 13:30:49 +02:00
94 lines
4.3 KiB
HTML
94 lines
4.3 KiB
HTML
<div v-if="activeTab === 'promptcraft'" class="tab-content">
|
|
<div class="transform-layout">
|
|
<div class="transform-section promptcraft-section">
|
|
<div class="section-header">
|
|
<h3><i class="fas fa-wand-magic-sparkles"></i> PromptCraft <small>AI-assisted prompt mutation</small></h3>
|
|
</div>
|
|
|
|
<div class="input-section">
|
|
<label>
|
|
Source Prompt
|
|
<textarea v-model="pcInput" placeholder="Enter your prompt to mutate..." rows="4"></textarea>
|
|
</label>
|
|
</div>
|
|
|
|
<div class="pc-controls">
|
|
<div class="pc-strategies">
|
|
<label class="pc-label">Strategy</label>
|
|
<div class="pc-strategy-grid">
|
|
<button
|
|
v-for="s in pcStrategies"
|
|
:key="s.id"
|
|
@click="pcStrategy = s.id"
|
|
:class="'pc-strategy-btn' + (pcStrategy === s.id ? ' active' : '')"
|
|
:title="s.desc"
|
|
>
|
|
<i :class="'fas ' + s.icon"></i>
|
|
<span>{{ s.name }}</span>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
<div v-if="pcStrategy === 'custom'" class="pc-custom-instruction">
|
|
<label>
|
|
Custom Mutation Instruction
|
|
<textarea v-model="pcCustomInstruction" placeholder="Describe how to mutate the prompt..." rows="2"></textarea>
|
|
</label>
|
|
</div>
|
|
|
|
<div class="options-grid pc-options">
|
|
<label>
|
|
Model
|
|
<select v-model="pcModel">
|
|
<option v-for="m in pcModels" :key="m.id" :value="m.id">{{ m.name }} ({{ m.provider }})</option>
|
|
</select>
|
|
</label>
|
|
<label>
|
|
Variants
|
|
<input type="number" v-model.number="pcCount" min="1" max="10" />
|
|
</label>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="token-bomb-actions mutation-actions">
|
|
<button class="transform-button pc-generate-btn" @click="pcRunMutation" :disabled="pcLoading">
|
|
<i :class="pcLoading ? 'fas fa-spinner fa-spin' : 'fas fa-bolt'"></i>
|
|
{{ pcLoading ? 'Generating...' : 'Mutate Prompt' }}
|
|
</button>
|
|
<button class="action-button copy" v-if="pcOutputs.length" @click="pcCopyAll">
|
|
<i class="fas fa-copy"></i> Copy All
|
|
</button>
|
|
</div>
|
|
|
|
<div v-if="pcError" class="pc-error">
|
|
<i class="fas fa-exclamation-triangle"></i> {{ pcError }}
|
|
</div>
|
|
|
|
<div class="output-container" v-if="pcOutputs.length">
|
|
<div class="pc-results">
|
|
<div v-for="(out, i) in pcOutputs" :key="'pc-'+i" class="pc-result-card">
|
|
<div class="pc-result-header">
|
|
<span class="pc-result-num">#{{ i + 1 }}</span>
|
|
<div class="pc-result-actions">
|
|
<button class="pc-action-btn" @click="pcUseAsInput(out)" title="Use as new input">
|
|
<i class="fas fa-arrow-rotate-left"></i>
|
|
</button>
|
|
<button class="pc-action-btn" @click="pcCopyOutput(out)" title="Copy">
|
|
<i class="fas fa-copy"></i>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
<div class="pc-result-text">{{ out }}</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div v-if="!pcOutputs.length && !pcLoading && !pcError" class="pc-empty-state">
|
|
<i class="fas fa-wand-magic-sparkles"></i>
|
|
<p>Enter a prompt and choose a mutation strategy.</p>
|
|
<p><small>Uses OpenRouter API — requires an API key set in Advanced Settings.</small></p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|