Files
2026-04-05 15:23:09 -04:00

103 lines
5.4 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<div v-if="activeTab === 'anticlassifier'" class="tab-content">
<div class="transform-layout">
<div class="transform-section anticlassifier-section">
<div class="section-header">
<h3><i class="fas fa-robot"></i> Anti-Classifier <small>Syntactic transformations via OpenRouter</small></h3>
<p class="ac-lede">Uses the same OpenRouter API key as PromptCraft. For research into how phrasing interacts with classifiers and filters.</p>
</div>
<div class="input-section">
<label>
Prompt to analyze
<textarea v-model="acInput" placeholder="Enter the prompt you want to analyze and transform..." rows="5"></textarea>
</label>
</div>
<div v-if="acGetLexemeAnalysis().totalFindings" class="lexeme-analysis-card">
<div class="lexeme-analysis-header">
<div>
<div class="lexeme-analysis-kicker">Latin-Root Analysis</div>
<h4>{{ acGetLexemeAnalysis().summary }}</h4>
<p>This input contains affix patterns that skew toward destructive or lethal framing. Use the generated rewrites to neutralize tone before transformation.</p>
</div>
<button type="button" class="action-button copy lexeme-neutralize-btn" @click="acNeutralizeInput">
<i class="fas fa-seedling"></i> Neutralize flagged terms
</button>
</div>
<div class="lexeme-analysis-list">
<div v-for="finding in acGetLexemeAnalysis().findings" :key="finding.id" class="lexeme-analysis-item">
<div class="lexeme-analysis-item-top">
<div class="lexeme-analysis-term-group">
<code class="lexeme-term">{{ finding.term }}</code>
<span class="lexeme-chip">{{ finding.partOfSpeech }}</span>
<span class="lexeme-chip">{{ finding.affixes.join(', ') }}</span>
<span class="lexeme-chip">confidence {{ Math.round(finding.confidence * 100) }}%</span>
</div>
<div class="lexeme-analysis-domain">
<span v-if="finding.semanticDomain"><strong>Domain:</strong> {{ finding.semanticDomain }}</span>
<span v-else><strong>Domain:</strong> unresolved root</span>
</div>
</div>
<p class="lexeme-analysis-rationale">{{ finding.rationale }}</p>
<div class="lexeme-analysis-rewrites">
<button
v-for="rewrite in finding.rewrites"
:key="finding.id + '-' + rewrite"
type="button"
class="lexeme-rewrite-btn"
@click="acApplyLexemeRewrite(finding.term, rewrite)"
>
{{ rewrite }}
</button>
</div>
</div>
</div>
</div>
<div class="options-grid ac-options">
<label>
Model
<select v-model="acModel">
<option v-for="m in acModels" :key="m.id" :value="m.id">{{ m.name }} ({{ m.provider }})</option>
</select>
</label>
<label
class="slider-block"
title="Sampling randomness: lower is more deterministic, higher is more varied (OpenRouter 02)."
>
Temperature
<input type="range" v-model.number="acTemperature" min="0" max="2" step="0.05" />
<span class="slider-value">{{ Number(acTemperature).toFixed(2) }}</span>
</label>
<label class="slider-block">
Max tokens
<input type="range" v-model.number="acMaxTokens" min="500" max="8000" step="100" />
<span class="slider-value">{{ acMaxTokens }}</span>
</label>
</div>
<div class="tool-toolbar">
<button type="button" class="transform-button ac-generate-btn tool-primary-btn" @click="acRun" :disabled="acLoading">
<i :class="acLoading ? 'fas fa-spinner fa-spin' : 'fas fa-bolt'"></i>
{{ acLoading ? 'Generating...' : 'Generate transformations' }}
</button>
<button class="action-button copy" v-if="acOutput" type="button" @click="acCopyOutput">
<i class="fas fa-copy"></i> Copy response
</button>
</div>
<div v-if="acError" class="pc-error ac-error">
<i class="fas fa-exclamation-triangle"></i> {{ acError }}
</div>
<div v-if="acOutput" class="output-container ac-output-wrap">
<div class="section-header">
<h4>Response</h4>
</div>
<pre class="ac-response">{{ acOutput }}</pre>
</div>
</div>
</div>
</div>