实现单篇和多篇论文的对比总结
This commit is contained in:
+454
-34
@@ -6,12 +6,33 @@
|
||||
min-height: 320px;
|
||||
box-sizing: border-box;
|
||||
font-size: 13px;
|
||||
-moz-user-select: text;
|
||||
user-select: text;
|
||||
}
|
||||
|
||||
.chatpapers-header {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 2px;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.chatpapers-brand {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
color: #2563eb;
|
||||
font-weight: 700;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.chatpapers-brand-icon {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.chatpapers-title-row {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.chatpapers-title {
|
||||
@@ -20,54 +41,92 @@
|
||||
}
|
||||
|
||||
.chatpapers-meta {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 5px;
|
||||
opacity: 0.7;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.chatpapers-messages {
|
||||
flex: 1;
|
||||
min-height: 180px;
|
||||
max-height: 420px;
|
||||
overflow: auto;
|
||||
border: 1px solid color-mix(in srgb, currentColor 18%, transparent);
|
||||
border-radius: 8px;
|
||||
padding: 8px;
|
||||
.chatpapers-meta-icon {
|
||||
flex-shrink: 0;
|
||||
opacity: 0.85;
|
||||
}
|
||||
|
||||
.chatpapers-empty {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
background: color-mix(in srgb, currentColor 4%, transparent);
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 6px;
|
||||
padding: 28px 16px;
|
||||
text-align: center;
|
||||
opacity: 0.72;
|
||||
}
|
||||
|
||||
.chatpapers-bubble {
|
||||
padding: 8px 10px;
|
||||
border-radius: 8px;
|
||||
white-space: pre-wrap;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
.chatpapers-user {
|
||||
background: color-mix(in srgb, #3b82f6 18%, transparent);
|
||||
align-self: flex-end;
|
||||
max-width: 92%;
|
||||
}
|
||||
|
||||
.chatpapers-assistant {
|
||||
background: color-mix(in srgb, currentColor 8%, transparent);
|
||||
align-self: flex-start;
|
||||
max-width: 96%;
|
||||
}
|
||||
|
||||
.chatpapers-role {
|
||||
font-size: 11px;
|
||||
opacity: 0.65;
|
||||
.chatpapers-empty-icon {
|
||||
color: #2563eb;
|
||||
opacity: 0.85;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.chatpapers-empty-title {
|
||||
font-weight: 600;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.chatpapers-empty-desc {
|
||||
font-size: 12px;
|
||||
max-width: 220px;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.chatpapers-icon {
|
||||
display: block;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.chatpapers-role-left {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 5px;
|
||||
}
|
||||
|
||||
.chatpapers-role-icon {
|
||||
opacity: 0.9;
|
||||
}
|
||||
|
||||
.chatpapers-copy {
|
||||
appearance: none;
|
||||
border: 1px solid color-mix(in srgb, currentColor 22%, transparent);
|
||||
background: color-mix(in srgb, currentColor 6%, transparent);
|
||||
border-radius: 4px;
|
||||
padding: 2px 6px;
|
||||
font-size: 11px;
|
||||
cursor: pointer;
|
||||
color: inherit;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.chatpapers-copy:hover {
|
||||
background: color-mix(in srgb, currentColor 14%, transparent);
|
||||
}
|
||||
|
||||
.chatpapers-status {
|
||||
min-height: 1.2em;
|
||||
font-size: 12px;
|
||||
opacity: 0.85;
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: 5px;
|
||||
}
|
||||
|
||||
.chatpapers-status-icon {
|
||||
display: inline-flex;
|
||||
margin-top: 1px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.chatpapers-status[data-kind="warn"] {
|
||||
@@ -78,6 +137,10 @@
|
||||
color: #b91c1c;
|
||||
}
|
||||
|
||||
.chatpapers-status[data-kind="info"] .chatpapers-status-icon {
|
||||
color: #2563eb;
|
||||
}
|
||||
|
||||
.chatpapers-toolbar,
|
||||
.chatpapers-actions {
|
||||
display: flex;
|
||||
@@ -85,14 +148,28 @@
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.chatpapers-composer {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.chatpapers-btn {
|
||||
appearance: none;
|
||||
border: 1px solid color-mix(in srgb, currentColor 22%, transparent);
|
||||
background: color-mix(in srgb, currentColor 6%, transparent);
|
||||
border-radius: 6px;
|
||||
padding: 4px 10px;
|
||||
padding: 5px 10px;
|
||||
cursor: pointer;
|
||||
font: inherit;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.chatpapers-btn-label {
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.chatpapers-btn:hover:not(:disabled) {
|
||||
@@ -114,6 +191,261 @@
|
||||
background: #1d4ed8;
|
||||
}
|
||||
|
||||
.chatpapers-messages {
|
||||
flex: 1;
|
||||
min-height: 180px;
|
||||
max-height: 420px;
|
||||
overflow: auto;
|
||||
border: 1px solid color-mix(in srgb, currentColor 18%, transparent);
|
||||
border-radius: 8px;
|
||||
padding: 8px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
background: color-mix(in srgb, currentColor 4%, transparent);
|
||||
-moz-user-select: text !important;
|
||||
user-select: text !important;
|
||||
cursor: text;
|
||||
scrollbar-width: thin;
|
||||
scrollbar-color: color-mix(in srgb, currentColor 35%, transparent) transparent;
|
||||
}
|
||||
|
||||
.chatpapers-messages::-webkit-scrollbar {
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
}
|
||||
|
||||
.chatpapers-messages::-webkit-scrollbar-thumb {
|
||||
background: color-mix(in srgb, currentColor 32%, transparent);
|
||||
border-radius: 999px;
|
||||
}
|
||||
|
||||
.chatpapers-messages::-webkit-scrollbar-track {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.chatpapers-bubble {
|
||||
padding: 8px 10px;
|
||||
border-radius: 8px;
|
||||
word-break: break-word;
|
||||
overflow-wrap: anywhere;
|
||||
-moz-user-select: text !important;
|
||||
user-select: text !important;
|
||||
cursor: text;
|
||||
}
|
||||
|
||||
.chatpapers-bubble .chatpapers-table-wrap {
|
||||
word-break: normal;
|
||||
overflow-wrap: normal;
|
||||
}
|
||||
|
||||
.chatpapers-content {
|
||||
-moz-user-select: text !important;
|
||||
user-select: text !important;
|
||||
cursor: text;
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
.chatpapers-content.chatpapers-md {
|
||||
white-space: normal;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.chatpapers-md > :first-child {
|
||||
margin-top: 0 !important;
|
||||
}
|
||||
|
||||
.chatpapers-md > :last-child {
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
|
||||
.chatpapers-md h1,
|
||||
.chatpapers-md h2,
|
||||
.chatpapers-md h3,
|
||||
.chatpapers-md h4 {
|
||||
margin: 0.45em 0 0.15em;
|
||||
line-height: 1.25;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.chatpapers-md h1 {
|
||||
font-size: 1.15em;
|
||||
}
|
||||
|
||||
.chatpapers-md h2 {
|
||||
font-size: 1.08em;
|
||||
}
|
||||
|
||||
.chatpapers-md h3,
|
||||
.chatpapers-md h4 {
|
||||
font-size: 1.02em;
|
||||
}
|
||||
|
||||
.chatpapers-md p {
|
||||
margin: 0.2em 0;
|
||||
}
|
||||
|
||||
.chatpapers-md ul,
|
||||
.chatpapers-md ol {
|
||||
margin: 0.2em 0;
|
||||
padding-left: 1.35em;
|
||||
}
|
||||
|
||||
.chatpapers-md li {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.chatpapers-md li + li {
|
||||
margin-top: 0.1em;
|
||||
}
|
||||
|
||||
.chatpapers-md code {
|
||||
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
||||
font-size: 0.92em;
|
||||
padding: 0.05em 0.3em;
|
||||
border-radius: 4px;
|
||||
background: color-mix(in srgb, currentColor 10%, transparent);
|
||||
}
|
||||
|
||||
.chatpapers-md pre {
|
||||
margin: 0.35em 0;
|
||||
padding: 6px 8px;
|
||||
border-radius: 6px;
|
||||
overflow: auto;
|
||||
background: color-mix(in srgb, currentColor 8%, transparent);
|
||||
border: 1px solid color-mix(in srgb, currentColor 12%, transparent);
|
||||
}
|
||||
|
||||
.chatpapers-md pre code {
|
||||
padding: 0;
|
||||
background: transparent;
|
||||
font-size: 0.88em;
|
||||
}
|
||||
|
||||
.chatpapers-md blockquote {
|
||||
margin: 0.3em 0;
|
||||
padding: 0 0.65em;
|
||||
border-left: 3px solid color-mix(in srgb, currentColor 35%, transparent);
|
||||
opacity: 0.92;
|
||||
}
|
||||
|
||||
.chatpapers-md blockquote p {
|
||||
margin: 0.15em 0;
|
||||
}
|
||||
|
||||
.chatpapers-md hr {
|
||||
border: none;
|
||||
border-top: 1px solid color-mix(in srgb, currentColor 18%, transparent);
|
||||
margin: 0.4em 0;
|
||||
}
|
||||
|
||||
.chatpapers-md a {
|
||||
color: #2563eb;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.chatpapers-md strong {
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.chatpapers-md em {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.chatpapers-table-wrap {
|
||||
display: block;
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
overflow-x: auto;
|
||||
margin: 0.45em 0;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
|
||||
.chatpapers-md table.chatpapers-table,
|
||||
.chatpapers-md .chatpapers-table {
|
||||
width: max-content;
|
||||
min-width: 100%;
|
||||
max-width: none;
|
||||
border-collapse: collapse;
|
||||
table-layout: auto;
|
||||
font-size: 0.92em;
|
||||
line-height: 1.35;
|
||||
word-break: normal;
|
||||
overflow-wrap: normal;
|
||||
}
|
||||
|
||||
.chatpapers-md .chatpapers-table th,
|
||||
.chatpapers-md .chatpapers-table td {
|
||||
border: 1px solid color-mix(in srgb, currentColor 22%, transparent);
|
||||
padding: 0.35em 0.55em;
|
||||
vertical-align: top;
|
||||
white-space: normal;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
.chatpapers-md .chatpapers-table th {
|
||||
font-weight: 700;
|
||||
background: color-mix(in srgb, currentColor 10%, transparent);
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.chatpapers-md .chatpapers-table tbody tr:nth-child(even) td {
|
||||
background: color-mix(in srgb, currentColor 4%, transparent);
|
||||
}
|
||||
|
||||
.chatpapers-math-inline {
|
||||
display: inline;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.chatpapers-math-block {
|
||||
display: block;
|
||||
margin: 0.35em 0;
|
||||
overflow-x: auto;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.chatpapers-math math {
|
||||
font-size: 1.05em;
|
||||
}
|
||||
|
||||
.chatpapers-math-block math {
|
||||
font-size: 1.1em;
|
||||
}
|
||||
|
||||
.chatpapers-tex {
|
||||
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
||||
font-size: 0.92em;
|
||||
padding: 0.05em 0.3em;
|
||||
border-radius: 4px;
|
||||
background: color-mix(in srgb, currentColor 10%, transparent);
|
||||
}
|
||||
|
||||
.chatpapers-user {
|
||||
background: color-mix(in srgb, #3b82f6 18%, transparent);
|
||||
align-self: flex-end;
|
||||
max-width: 92%;
|
||||
}
|
||||
|
||||
.chatpapers-assistant {
|
||||
background: color-mix(in srgb, currentColor 8%, transparent);
|
||||
align-self: flex-start;
|
||||
max-width: 96%;
|
||||
}
|
||||
|
||||
.chatpapers-role {
|
||||
font-size: 11px;
|
||||
opacity: 0.65;
|
||||
margin-bottom: 4px;
|
||||
font-weight: 600;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 8px;
|
||||
-moz-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.chatpapers-input {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
@@ -125,6 +457,8 @@
|
||||
font: inherit;
|
||||
background: transparent;
|
||||
color: inherit;
|
||||
-moz-user-select: text;
|
||||
user-select: text;
|
||||
}
|
||||
|
||||
.chatpapers-loading {
|
||||
@@ -138,3 +472,89 @@
|
||||
margin: 4px 0 10px;
|
||||
max-width: 52em;
|
||||
}
|
||||
|
||||
.chatpapers-multi-root {
|
||||
height: 100%;
|
||||
min-height: 0;
|
||||
max-height: 100%;
|
||||
overflow: hidden;
|
||||
gap: 6px;
|
||||
padding: 10px 12px 12px;
|
||||
}
|
||||
|
||||
.chatpapers-multi-root .chatpapers-header,
|
||||
.chatpapers-multi-root .chatpapers-paper-chips,
|
||||
.chatpapers-multi-root .chatpapers-status,
|
||||
.chatpapers-multi-root .chatpapers-toolbar,
|
||||
.chatpapers-multi-root .chatpapers-composer {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.chatpapers-multi-root .chatpapers-messages {
|
||||
flex: 1 1 auto;
|
||||
min-height: 140px;
|
||||
max-height: none;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.chatpapers-multi-root .chatpapers-empty-desc {
|
||||
max-width: 420px;
|
||||
}
|
||||
|
||||
.chatpapers-multi-root .chatpapers-composer {
|
||||
margin-top: 2px;
|
||||
padding-top: 4px;
|
||||
border-top: 1px solid color-mix(in srgb, currentColor 12%, transparent);
|
||||
}
|
||||
|
||||
.chatpapers-multi-root .chatpapers-toolbar {
|
||||
padding-top: 2px;
|
||||
}
|
||||
|
||||
/* Dialog chrome: hide empty footer button area; thin scrollbars */
|
||||
#dialog-button-box,
|
||||
.dialog-button-box {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.chatpapers-table-wrap,
|
||||
.chatpapers-multi-root {
|
||||
scrollbar-width: thin;
|
||||
scrollbar-color: color-mix(in srgb, currentColor 35%, transparent) transparent;
|
||||
}
|
||||
|
||||
.chatpapers-table-wrap::-webkit-scrollbar,
|
||||
.chatpapers-multi-root::-webkit-scrollbar {
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
}
|
||||
|
||||
.chatpapers-table-wrap::-webkit-scrollbar-thumb,
|
||||
.chatpapers-multi-root::-webkit-scrollbar-thumb {
|
||||
background: color-mix(in srgb, currentColor 32%, transparent);
|
||||
border-radius: 999px;
|
||||
}
|
||||
|
||||
.chatpapers-paper-chips {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 6px;
|
||||
max-height: 72px;
|
||||
overflow: auto;
|
||||
margin-bottom: 2px;
|
||||
scrollbar-width: thin;
|
||||
}
|
||||
|
||||
.chatpapers-chip {
|
||||
display: inline-block;
|
||||
max-width: 220px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
font-size: 11px;
|
||||
padding: 3px 8px;
|
||||
border-radius: 999px;
|
||||
border: 1px solid color-mix(in srgb, currentColor 18%, transparent);
|
||||
background: color-mix(in srgb, #2563eb 10%, transparent);
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
@@ -21,4 +21,26 @@ chat-cleared = Chat cleared
|
||||
chat-no-reply = No AI reply to save yet
|
||||
chat-note-saved = Saved as note
|
||||
chat-selection-added = Selection added to next message
|
||||
chat-selection-empty = No text selected in the reader
|
||||
chat-selection-empty = No text selected. Select text in the PDF first, then click this button (do not click elsewhere in between).
|
||||
chat-copy = Copy
|
||||
chat-copied = Copied to clipboard
|
||||
chat-empty-title = Start a conversation
|
||||
chat-empty-desc = Summarize this paper or ask a question about methods, results, and limitations.
|
||||
|
||||
itemmenu-chat = ChatPapers: Open chat
|
||||
itemmenu-compare = ChatPapers: Compare papers
|
||||
|
||||
multi-title = Multi-paper chat
|
||||
multi-empty-title = Read papers together
|
||||
multi-empty-desc = Enter a research topic and click Topic review for writing-ready notes; or compare, summarize each, or ask freely.
|
||||
multi-placeholder = Enter a topic or question, e.g. Diffusion models for medical image segmentation
|
||||
multi-topic-review = Topic review
|
||||
multi-need-topic = Enter a research topic in the box, then click Topic review
|
||||
multi-compare = Compare
|
||||
multi-summary-each = Summarize each
|
||||
multi-common = Common themes
|
||||
multi-close = Close
|
||||
multi-no-items = Please select items first
|
||||
multi-need-two = Select at least 2 items to compare
|
||||
multi-too-many = { $count } items selected; using the first 8
|
||||
multi-ready = { $count } papers ready for topic review
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
itemmenu-label = ChatPapers: Summarize
|
||||
itemmenu-chat = ChatPapers: Open chat
|
||||
itemmenu-compare = ChatPapers: Compare papers
|
||||
|
||||
@@ -21,4 +21,27 @@ chat-cleared = 已清空对话
|
||||
chat-no-reply = 还没有可保存的 AI 回复
|
||||
chat-note-saved = 已保存为笔记
|
||||
chat-selection-added = 已将选区加入下一条消息
|
||||
chat-selection-empty = 阅读器中没有选中文本
|
||||
chat-selection-empty = 未检测到选区。请先在 PDF 中拖选文字,再直接点「添加选区」(中间不要点别处)。
|
||||
chat-copy = 复制
|
||||
chat-copied = 已复制到剪贴板
|
||||
chat-empty-title = 开始对话
|
||||
chat-empty-desc = 可以一键总结本文,或提问方法、结果与局限等问题。
|
||||
|
||||
itemmenu-chat = ChatPapers:打开对话
|
||||
itemmenu-compare = ChatPapers:多篇对照
|
||||
|
||||
multi-title = 多篇对照
|
||||
multi-empty-title = 多论文整体阅读
|
||||
multi-empty-desc = 先在输入框写研究主题,点「主题综述」生成可写入要点;也可对比、各自摘要或自由提问。
|
||||
multi-placeholder = 输入研究主题或问题,例如:扩散模型在医学影像分割中的应用
|
||||
multi-topic-review = 主题综述
|
||||
multi-need-topic = 请先在输入框填写研究主题,再点「主题综述」
|
||||
multi-compare = 对比差异
|
||||
multi-summary-each = 各自摘要
|
||||
multi-common = 共同主题
|
||||
multi-close = 关闭
|
||||
multi-no-items = 请先选择文献
|
||||
multi-need-two = 请至少选择 2 篇文献再对照
|
||||
multi-too-many = 已选择 { $count } 篇,将使用前 8 篇
|
||||
multi-ready = 已选择 { $count } 篇文献,可开始整体阅读与主题综述
|
||||
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
itemmenu-label = ChatPapers:总结
|
||||
itemmenu-chat = ChatPapers:打开对话
|
||||
itemmenu-compare = ChatPapers:多篇对照
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ pref("openrouterTitle", "ChatPapers");
|
||||
pref("temperature", "0.3");
|
||||
pref("maxTokens", 2048);
|
||||
pref("timeoutMs", 120000);
|
||||
pref("maxContextChars", 80000);
|
||||
pref("maxContextChars", 100000);
|
||||
pref("answerLanguage", "zh-CN");
|
||||
pref("systemPrompt", "");
|
||||
pref("summaryPrompt", "");
|
||||
|
||||
Reference in New Issue
Block a user