'
+ '
| '
+ '
| '
+ ' '
+ f'{label}{code} |
| ' + ' | '
+ '
|
| ' + ' | '
+ '
|
'
+ '
| '
+ '
'
+ '
| '
+ '
| '
+ ' '
+ f'{_escape_text_preserve_breaks(text)} |
| ' + ' | '
+ '
|
| ' + '— New topic —' + ' |
| ' + ' | '
+ '
|
No messages
") + QTimer.singleShot(120, lambda: browser.verticalScrollBar().setValue(browser.verticalScrollBar().maximum())) + root.addWidget(browser) + + bot_bar = QWidget() + bot_bar.setFixedHeight(52) + bot_bar.setStyleSheet(""" + QWidget { + background:#ffffff; + border-top:1px solid #ececec; + } + """) + bot_layout = QHBoxLayout(bot_bar) + bot_layout.setContentsMargins(16, 0, 16, 0) + + info_lbl = QLabel(f"Created {created[:10]} · {n_usr + n_bot} total messages") + info_lbl.setStyleSheet("font-size:10px; color:#bbb; background:transparent;") + bot_layout.addWidget(info_lbl) + bot_layout.addStretch() + + done_btn = QPushButton("Done") + done_btn.setFixedHeight(32) + done_btn.setStyleSheet(""" + QPushButton { + font-size:12px; font-weight:600; + padding:4px 22px; + background:#0095f6; color:white; + border:none; border-radius:16px; + } + QPushButton:hover { background:#0082d8; } + QPushButton:pressed{ background:#006ab8; } + """) + done_btn.clicked.connect(self.accept) + bot_layout.addWidget(done_btn) + root.addWidget(bot_bar) + + +# ── Sidebar ─────────────────────────────────────────────────────────────────── + +class _DeleteConfirmDialog(QDialog): + def __init__(self, title: str, parent=None): + super().__init__(parent, Qt.FramelessWindowHint | Qt.Dialog) + self.setAttribute(Qt.WA_TranslucentBackground) + self.setMinimumWidth(320) + + outer = QWidget(self) + outer.setObjectName("card") + outer.setStyleSheet(""" + QWidget#card { + background: #ffffff; + border-radius: 20px; + border: 1px solid #e0e0e0; + } + """) + + card_layout = QVBoxLayout(outer) + card_layout.setContentsMargins(28, 24, 28, 20) + card_layout.setSpacing(14) + + title_lbl = QLabel("Delete chat?") + title_lbl.setStyleSheet("font-size:16px; font-weight:bold; color:#1a1a2e;") + title_lbl.setAlignment(Qt.AlignCenter) + card_layout.addWidget(title_lbl) + + body_lbl = QLabel( + f'' + f'Delete “{_escape_text_preserve_breaks(title[:40])}”?| '
+ ' '
+ f'Viewing saved chat: {_escape_text_preserve_breaks(title[:50])}'
+ f' · {_escape_text_preserve_breaks(created)}'
+ f' · {kind}'
+ ' ' + 'Scroll down to see full conversation' + ' |
| ' + f'❌ Netlist file not found: {_escape_text_preserve_breaks(netlist_path)} |
| ' + f'❌ Could not read file: {_escape_text_preserve_breaks(str(e))} |
| '
+ ' '
+ '⚠️ Simulation Failed — Analyzing error log…'
+ ' |