0d3cb498a3
CI / Shell Format Check (push) Has been cancelled
CI / Check Ruby (3.4) (push) Has been cancelled
CI / CI Config (push) Has been cancelled
CI / Test on Node ${{ matrix.node }} and ${{ matrix.os }}${{ matrix.shard && format(' (shard {0}/3)', matrix.shard) || '' }} (push) Has been cancelled
CI / Build on Node ${{ matrix.node }} (push) Has been cancelled
CI / Style Check (push) Has been cancelled
CI / Generate Assets (push) Has been cancelled
CI / Check Python (3.14) (push) Has been cancelled
CI / Check Python (3.9) (push) Has been cancelled
CI / Build Docs (push) Has been cancelled
CI / Code Scan Action (push) Has been cancelled
CI / Site tests (push) Has been cancelled
CI / webui tests (push) Has been cancelled
CI / Run Integration Tests (push) Has been cancelled
CI / Run Smoke Tests (push) Has been cancelled
CI / Go Tests (push) Has been cancelled
CI / Share Test (push) Has been cancelled
CI / Redteam (Production API) (push) Has been cancelled
CI / Redteam (Staging API) (push) Has been cancelled
CI / GitHub Actions Lint (push) Has been cancelled
CI / Check Ruby (3.0) (push) Has been cancelled
release-please / release-please (push) Has been cancelled
release-please / build (push) Has been cancelled
release-please / publish-npm (push) Has been cancelled
release-please / publish-npm-backfill (push) Has been cancelled
release-please / docker (push) Has been cancelled
release-please / publish-code-scan-action (push) Has been cancelled
release-please / attest-code-scan-action (push) Has been cancelled
Deploy local.promptfoo.app / Deploy to Cloudflare Pages (push) Has been cancelled
Test and Publish Multi-arch Docker Image / test (push) Has been cancelled
Test and Publish Multi-arch Docker Image / build-docker-and-push-digests (map[digest-suffix:linux-amd64 platform:linux/amd64 runner:ubuntu-latest]) (push) Has been cancelled
Test and Publish Multi-arch Docker Image / build-docker-and-push-digests (map[digest-suffix:linux-arm64 platform:linux/arm64 runner:ubuntu-24.04-arm]) (push) Has been cancelled
Test and Publish Multi-arch Docker Image / merge-docker-digests (push) Has been cancelled
Test and Publish Multi-arch Docker Image / Attest Multi-arch Image (push) Has been cancelled
Validate Renovate Config / Validate Renovate Configuration (push) Has been cancelled
619 lines
10 KiB
CSS
619 lines
10 KiB
CSS
/* Base styles */
|
|
.turnConfirmation {
|
|
display: flex;
|
|
gap: 1rem;
|
|
justify-content: center;
|
|
padding: 1rem 0;
|
|
}
|
|
|
|
.tryAgainButtonUnsafe {
|
|
margin-top: 10px;
|
|
padding: 0.75rem 1.5rem;
|
|
background: #ffffff;
|
|
color: #000000;
|
|
border: none;
|
|
border-radius: 8px;
|
|
font-size: 0.875rem;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.tryAgainButtonUnsafe:hover {
|
|
background: rgba(255, 255, 255, 0.9);
|
|
}
|
|
|
|
.confirmButton {
|
|
padding: 0.75rem 1.5rem;
|
|
background: #2563eb;
|
|
color: #ffffff;
|
|
border: none;
|
|
border-radius: 8px;
|
|
font-size: 0.875rem;
|
|
font-weight: 500;
|
|
cursor: pointer;
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.confirmButton:hover {
|
|
background: #1d4ed8;
|
|
}
|
|
|
|
.cancelButton {
|
|
padding: 0.75rem 1.5rem;
|
|
background: #ffffff;
|
|
color: #666666;
|
|
border: 1px solid #e5e5e5;
|
|
border-radius: 8px;
|
|
font-size: 0.875rem;
|
|
font-weight: 500;
|
|
cursor: pointer;
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.cancelButton:hover {
|
|
border-color: #2563eb;
|
|
color: #2563eb;
|
|
}
|
|
|
|
.additionalTurnContainer {
|
|
display: flex;
|
|
justify-content: center;
|
|
padding: 1rem 0;
|
|
}
|
|
|
|
.additionalTurnButton {
|
|
padding: 0.75rem 1.5rem;
|
|
background: #2563eb;
|
|
color: #ffffff;
|
|
border: none;
|
|
border-radius: 8px;
|
|
font-size: 0.875rem;
|
|
font-weight: 500;
|
|
cursor: pointer;
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.additionalTurnButton:hover {
|
|
background: #1d4ed8;
|
|
}
|
|
|
|
.additionalTurnButton:disabled {
|
|
background: #e5e5e5;
|
|
cursor: not-allowed;
|
|
color: #666666;
|
|
}
|
|
|
|
.container {
|
|
width: 100%;
|
|
max-width: 1200px;
|
|
margin: 2rem auto;
|
|
padding: 2rem;
|
|
height: 800px;
|
|
background: #ffffff;
|
|
border-radius: 12px;
|
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
|
position: relative;
|
|
display: flex;
|
|
flex-direction: column;
|
|
overflow: hidden;
|
|
}
|
|
|
|
/* Setup Stage */
|
|
.setup {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 1.5rem;
|
|
height: 100%;
|
|
}
|
|
|
|
.setup h2 {
|
|
font-size: 1.5rem;
|
|
font-weight: 600;
|
|
color: #1a1a1a;
|
|
margin: 0;
|
|
}
|
|
|
|
.goalInput {
|
|
width: 100%;
|
|
min-height: 120px;
|
|
padding: 1rem;
|
|
border: 1px solid #e5e5e5;
|
|
border-radius: 8px;
|
|
font-size: 0.875rem;
|
|
resize: vertical;
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.goalInput:focus {
|
|
outline: none;
|
|
border-color: #2563eb;
|
|
box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
|
|
}
|
|
|
|
/* Config Stage */
|
|
.config {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 1.5rem;
|
|
height: 100%;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.config h2 {
|
|
font-size: 1.5rem;
|
|
font-weight: 600;
|
|
color: #1a1a1a;
|
|
margin: 0;
|
|
}
|
|
|
|
.attacksGrid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
|
|
gap: 1rem;
|
|
flex: 1;
|
|
overflow-y: auto;
|
|
padding: 0.5rem;
|
|
margin: -0.5rem;
|
|
}
|
|
|
|
.attackCard {
|
|
background: #ffffff;
|
|
border: 1px solid #e5e5e5;
|
|
border-radius: 8px;
|
|
padding: 1rem;
|
|
}
|
|
|
|
.attackHeader {
|
|
display: flex;
|
|
align-items: flex-start;
|
|
gap: 0.75rem;
|
|
}
|
|
|
|
.iconWrapper {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
width: 2rem;
|
|
height: 2rem;
|
|
background: #f5f5f5;
|
|
border-radius: 6px;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.icon {
|
|
width: 1rem;
|
|
height: 1rem;
|
|
}
|
|
|
|
.attackInfo {
|
|
flex: 1;
|
|
min-width: 0;
|
|
}
|
|
|
|
.attackInfo h3 {
|
|
font-size: 0.875rem;
|
|
font-weight: 600;
|
|
color: #1a1a1a;
|
|
margin: 0;
|
|
}
|
|
|
|
.attackInfo p {
|
|
font-size: 0.875rem;
|
|
color: #666666;
|
|
margin: 0.25rem 0 0 0;
|
|
line-height: 1.4;
|
|
}
|
|
|
|
/* Chat Interface */
|
|
.conversationSection {
|
|
display: flex;
|
|
flex-direction: column;
|
|
height: 100%;
|
|
gap: 1rem;
|
|
overflow: hidden;
|
|
min-height: 600px;
|
|
}
|
|
|
|
.messageContainer {
|
|
flex: 1;
|
|
overflow-y: auto;
|
|
padding: 1rem;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 1rem;
|
|
background: #f8fafc;
|
|
border-radius: 8px;
|
|
scroll-behavior: smooth;
|
|
min-height: 500px;
|
|
}
|
|
|
|
.message {
|
|
display: flex;
|
|
max-width: 80%;
|
|
}
|
|
|
|
.attacker {
|
|
margin-left: auto;
|
|
}
|
|
|
|
.target {
|
|
margin-right: auto;
|
|
}
|
|
|
|
.messageContent {
|
|
padding: 1rem;
|
|
border-radius: 8px;
|
|
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
|
|
width: 100%;
|
|
}
|
|
|
|
.attacker .messageContent {
|
|
background: #2563eb;
|
|
color: #ffffff;
|
|
}
|
|
|
|
.target .messageContent {
|
|
background: #ffffff;
|
|
color: #1a1a1a;
|
|
}
|
|
|
|
.messageHeader {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
|
|
.messageRole {
|
|
font-weight: 600;
|
|
font-size: 0.875rem;
|
|
}
|
|
|
|
.messageTimestamp {
|
|
font-size: 0.75rem;
|
|
opacity: 0.8;
|
|
}
|
|
|
|
.messageMetadata {
|
|
border-top: 1px solid rgba(255, 255, 255, 0.2);
|
|
border-bottom: 1px solid rgba(255, 255, 255, 0.2);
|
|
margin: 0.75rem 0;
|
|
padding: 0.75rem 0;
|
|
}
|
|
|
|
.metadataItem {
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
|
|
.metadataItem:last-child {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.metadataLabel {
|
|
font-weight: 600;
|
|
font-size: 0.75rem;
|
|
margin-right: 0.5rem;
|
|
opacity: 0.9;
|
|
}
|
|
|
|
.metadataValue {
|
|
font-size: 0.875rem;
|
|
opacity: 0.9;
|
|
}
|
|
|
|
.messageBody {
|
|
font-size: 0.875rem;
|
|
line-height: 1.5;
|
|
white-space: pre-wrap;
|
|
}
|
|
|
|
.safetyTag {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
margin-top: 0.75rem;
|
|
padding: 0.25rem 0.75rem;
|
|
border-radius: 9999px;
|
|
font-size: 0.75rem;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.safe {
|
|
background: #22c55e;
|
|
color: white;
|
|
}
|
|
|
|
.unsafe {
|
|
background: #ef4444;
|
|
color: white;
|
|
}
|
|
|
|
.unknown {
|
|
background: #f59e0b;
|
|
color: white;
|
|
}
|
|
|
|
.safetyIcon {
|
|
width: 12px;
|
|
height: 12px;
|
|
}
|
|
|
|
/* Progress Bar */
|
|
.progressBar {
|
|
width: 100%;
|
|
height: 4px;
|
|
background: #e5e5e5;
|
|
border-radius: 9999px;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.progressFill {
|
|
height: 100%;
|
|
background: #2563eb;
|
|
border-radius: 9999px;
|
|
transition: width 0.2s ease;
|
|
}
|
|
|
|
/* Buttons */
|
|
.button {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 0.75rem 1.5rem;
|
|
background: #ffffff;
|
|
border: 1px solid #e5e5e5;
|
|
border-radius: 8px;
|
|
font-size: 0.875rem;
|
|
font-weight: 500;
|
|
color: #1a1a1a;
|
|
cursor: pointer;
|
|
transition: all 0.2s ease;
|
|
align-self: flex-end;
|
|
}
|
|
|
|
.button:hover {
|
|
border-color: #2563eb;
|
|
color: #2563eb;
|
|
}
|
|
|
|
.runButton {
|
|
width: 100%;
|
|
padding: 0.75rem 1.5rem;
|
|
background: #2563eb;
|
|
color: #ffffff;
|
|
border: none;
|
|
border-radius: 8px;
|
|
font-size: 0.875rem;
|
|
font-weight: 500;
|
|
cursor: pointer;
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.runButton:hover {
|
|
background: #1d4ed8;
|
|
}
|
|
|
|
.runButton:disabled {
|
|
background: #e5e5e5;
|
|
cursor: not-allowed;
|
|
color: #666666;
|
|
}
|
|
|
|
/* Scrollbar Styles */
|
|
.messageContainer::-webkit-scrollbar,
|
|
.attacksGrid::-webkit-scrollbar {
|
|
width: 8px;
|
|
}
|
|
|
|
.messageContainer::-webkit-scrollbar-track,
|
|
.attacksGrid::-webkit-scrollbar-track {
|
|
background: #f5f5f5;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.messageContainer::-webkit-scrollbar-thumb,
|
|
.attacksGrid::-webkit-scrollbar-thumb {
|
|
background: #e5e5e5;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.messageContainer::-webkit-scrollbar-thumb:hover,
|
|
.attacksGrid::-webkit-scrollbar-thumb:hover {
|
|
background: #d4d4d4;
|
|
}
|
|
|
|
/* Responsive Styles */
|
|
@media (max-width: 768px) {
|
|
.container {
|
|
margin: 1rem;
|
|
padding: 1rem;
|
|
height: calc(100vh - 2rem);
|
|
}
|
|
|
|
.attacksGrid {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
|
|
.message {
|
|
max-width: 90%;
|
|
}
|
|
|
|
.turnConfirmation {
|
|
flex-direction: column;
|
|
gap: 0.5rem;
|
|
}
|
|
}
|
|
|
|
.completionMessage {
|
|
padding: 0.75rem 1.5rem;
|
|
background: #ef4444;
|
|
color: #ffffff;
|
|
border-radius: 8px;
|
|
font-size: 0.875rem;
|
|
font-weight: 500;
|
|
text-align: center;
|
|
}
|
|
|
|
.safeCompletionMessage {
|
|
text-align: center;
|
|
padding: 1.5rem;
|
|
background: #22c55e;
|
|
color: #ffffff;
|
|
border-radius: 8px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 1rem;
|
|
align-items: center;
|
|
}
|
|
|
|
.safeCompletionMessage p {
|
|
margin: 0;
|
|
font-size: 0.875rem;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.tryAgainButton {
|
|
padding: 0.75rem 1.5rem;
|
|
background: #ffffff;
|
|
color: #22c55e;
|
|
border: none;
|
|
border-radius: 8px;
|
|
font-size: 0.875rem;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.tryAgainButton:hover {
|
|
background: rgba(255, 255, 255, 0.9);
|
|
}
|
|
|
|
/* Dark Mode Styles */
|
|
html[data-theme='dark'] .container {
|
|
background: #1a1a1a;
|
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
|
|
}
|
|
|
|
html[data-theme='dark'] h2,
|
|
html[data-theme='dark'] h3 {
|
|
color: #ffffff;
|
|
}
|
|
|
|
html[data-theme='dark'] .goalInput {
|
|
background: #262626;
|
|
border-color: #404040;
|
|
color: #ffffff;
|
|
}
|
|
|
|
html[data-theme='dark'] .goalInput:focus {
|
|
border-color: #3b82f6;
|
|
box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
|
|
}
|
|
|
|
html[data-theme='dark'] .attackCard {
|
|
background: #262626;
|
|
border-color: #404040;
|
|
}
|
|
|
|
html[data-theme='dark'] .iconWrapper {
|
|
background: #333333;
|
|
}
|
|
|
|
html[data-theme='dark'] .attackInfo p {
|
|
color: #a3a3a3;
|
|
}
|
|
|
|
html[data-theme='dark'] .messageContainer {
|
|
background: #262626;
|
|
}
|
|
|
|
html[data-theme='dark'] .target .messageContent {
|
|
background: #333333;
|
|
color: #ffffff;
|
|
}
|
|
|
|
html[data-theme='dark'] .messageTimestamp {
|
|
color: #a3a3a3;
|
|
}
|
|
|
|
html[data-theme='dark'] .button {
|
|
background: #262626;
|
|
border-color: #404040;
|
|
color: #ffffff;
|
|
}
|
|
|
|
html[data-theme='dark'] .button:hover {
|
|
border-color: #3b82f6;
|
|
color: #3b82f6;
|
|
}
|
|
|
|
html[data-theme='dark'] .cancelButton {
|
|
background: #262626;
|
|
border-color: #404040;
|
|
color: #a3a3a3;
|
|
}
|
|
|
|
html[data-theme='dark'] .cancelButton:hover {
|
|
border-color: #3b82f6;
|
|
color: #3b82f6;
|
|
}
|
|
|
|
html[data-theme='dark'] .progressBar {
|
|
background: #404040;
|
|
}
|
|
|
|
html[data-theme='dark'] .messageContainer::-webkit-scrollbar-track,
|
|
html[data-theme='dark'] .attacksGrid::-webkit-scrollbar-track {
|
|
background: #262626;
|
|
}
|
|
|
|
html[data-theme='dark'] .messageContainer::-webkit-scrollbar-thumb,
|
|
html[data-theme='dark'] .attacksGrid::-webkit-scrollbar-thumb {
|
|
background: #404040;
|
|
}
|
|
|
|
html[data-theme='dark'] .messageContainer::-webkit-scrollbar-thumb:hover,
|
|
html[data-theme='dark'] .attacksGrid::-webkit-scrollbar-thumb:hover {
|
|
background: #525252;
|
|
}
|
|
|
|
html[data-theme='dark'] .tryAgainButtonUnsafe {
|
|
background: #262626;
|
|
color: #ffffff;
|
|
}
|
|
|
|
html[data-theme='dark'] .tryAgainButtonUnsafe:hover {
|
|
background: #333333;
|
|
}
|
|
|
|
html[data-theme='dark'] .tryAgainButton {
|
|
background: #333333;
|
|
color: #22c55e;
|
|
}
|
|
|
|
html[data-theme='dark'] .tryAgainButton:hover {
|
|
background: #404040;
|
|
}
|
|
|
|
html[data-theme='dark'] .runButton:disabled {
|
|
background: #333333;
|
|
color: #666666;
|
|
}
|
|
|
|
html[data-theme='dark'] .additionalTurnButton:disabled {
|
|
background: #333333;
|
|
color: #666666;
|
|
}
|
|
|
|
/* Additional dark mode styles for metadata */
|
|
html[data-theme='dark'] .messageMetadata {
|
|
border-top-color: rgba(255, 255, 255, 0.1);
|
|
border-bottom-color: rgba(255, 255, 255, 0.1);
|
|
}
|
|
|
|
html[data-theme='dark'] .metadataLabel,
|
|
html[data-theme='dark'] .metadataValue {
|
|
color: #e5e5e5;
|
|
}
|