fix: merge context + topic into single field — one clear purpose
- Removed separate 'topic' field from BipolarTriggerRequest model - Removed topic parameter from force_trigger_argument, force_trigger_argument_from_message_id, and run_argument - trigger_context now doubles as the argument theme: if provided by user, it becomes the topic; if blank, a random topic is selected from the rotation pool - Web UI: replaced two confusing fields (Context + Topic) with one clear field labeled 'What should they argue about? (optional)' with a plain-English description - JS: removed topic field reference, context.trim() ensures empty strings aren't sent
This commit is contained in:
@@ -234,15 +234,10 @@
|
||||
</div>
|
||||
|
||||
<div style="margin-bottom: 1rem;">
|
||||
<label for="bipolar-context">Argument Context (optional):</label>
|
||||
<input type="text" id="bipolar-context" placeholder="e.g., They're fighting about who's the real Miku..." style="width: 100%; margin-top: 0.3rem;">
|
||||
</div>
|
||||
|
||||
<div style="margin-bottom: 1rem;">
|
||||
<label for="bipolar-topic">Argument Topic (optional — overrides random topic):</label>
|
||||
<input type="text" id="bipolar-topic" placeholder="e.g., Who deserves the spotlight? A philosophical debate about worth..." style="width: 100%; margin-top: 0.3rem;">
|
||||
<label for="bipolar-context">What should they argue about? (optional):</label>
|
||||
<input type="text" id="bipolar-context" placeholder="e.g., Who's the real Miku? Whether kindness is weakness. A petty grudge..." style="width: 100%; margin-top: 0.3rem;">
|
||||
<div style="font-size: 0.75rem; color: #777; margin-top: 0.2rem;">
|
||||
Leave blank for random topic selection. Enter a custom theme to frame the argument uniquely.
|
||||
Leave blank for a random topic. Write anything to set the argument's theme.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -248,8 +248,7 @@ async function triggerPersonaDialogue() {
|
||||
async function triggerBipolarArgument() {
|
||||
const channelIdInput = document.getElementById('bipolar-channel-id').value.trim();
|
||||
const messageIdInput = document.getElementById('bipolar-message-id').value.trim();
|
||||
const context = document.getElementById('bipolar-context').value;
|
||||
const topic = document.getElementById('bipolar-topic').value.trim();
|
||||
const context = document.getElementById('bipolar-context').value.trim();
|
||||
const statusDiv = document.getElementById('bipolar-status');
|
||||
|
||||
if (!channelIdInput) {
|
||||
@@ -279,10 +278,6 @@ async function triggerBipolarArgument() {
|
||||
requestBody.message_id = messageIdInput;
|
||||
}
|
||||
|
||||
if (topic) {
|
||||
requestBody.topic = topic;
|
||||
}
|
||||
|
||||
const result = await apiCall('/bipolar-mode/trigger-argument', 'POST', requestBody);
|
||||
|
||||
if (result.status === 'error') {
|
||||
@@ -295,7 +290,6 @@ async function triggerBipolarArgument() {
|
||||
showNotification(`⚔️ Argument triggered!`);
|
||||
|
||||
document.getElementById('bipolar-context').value = '';
|
||||
document.getElementById('bipolar-topic').value = '';
|
||||
document.getElementById('bipolar-message-id').value = '';
|
||||
|
||||
loadActiveArguments();
|
||||
|
||||
Reference in New Issue
Block a user