Skip to content

Commit

Permalink
Merge pull request #360 from n4ze3m/next
Browse files Browse the repository at this point in the history
v1.5.0
  • Loading branch information
n4ze3m authored Feb 9, 2025
2 parents 1eae319 + 084b859 commit de367a1
Show file tree
Hide file tree
Showing 60 changed files with 2,517 additions and 1,259 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Page Assist

[![Join dialoqbase #welcome](https://img.shields.io/badge/discord-join%20chat-blue.svg)](https://discord.gg/bu54382uBd)
[![Twitter Follow](https://img.shields.io/twitter/follow/page_assist?style=social)](https://twitter.com/page_assist)

Page Assist is an open-source browser extension that provides a sidebar and web UI for your local AI model. It allows you to interact with your model from any webpage.
## Installation
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@
"scripts": {
"dev": "cross-env TARGET=chrome wxt",
"dev:firefox": "cross-env TARGET=firefox wxt -b firefox",
"dev:edge": "cross-env TARGET=chrome wxt -b edge",
"build": "cross-env TARGET=chrome wxt build",
"build:firefox": "cross-env TARGET=firefox wxt build -b firefox",
"build:edge": "cross-env TARGET=chrome wxt build -b edge",
"zip": "cross-env TARGET=chrome wxt zip",
"zip:firefox": "cross-env TARGET=firefox wxt zip -b firefox",
"compile": "tsc --noEmit",
Expand Down
3 changes: 3 additions & 0 deletions src/assets/locale/ar/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@
},
"ssmlEnabled": {
"label": "تمكين SSML (لغة ترميز توليف الكلام)"
},
"removeReasoningTagTTS": {
"label": "إزالة علامة التفكير من تحويل النص إلى كلام"
}
}
},
Expand Down
3 changes: 3 additions & 0 deletions src/assets/locale/da/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@
},
"ssmlEnabled": {
"label": "Aktiver SSML (Speech Synthesis Markup Language)"
},
"removeReasoningTagTTS": {
"label": "Fjern Ræsonnement Tag fra TTS"
}
}
},
Expand Down
3 changes: 3 additions & 0 deletions src/assets/locale/de/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@
},
"ssmlEnabled": {
"label": "SSML (Speech Synthesis Markup Language) aktivieren"
},
"removeReasoningTagTTS": {
"label": "Reasoning-Tag aus Text-zu-Sprache entfernen"
}
}
},
Expand Down
3 changes: 3 additions & 0 deletions src/assets/locale/en/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,9 @@
},
"responseSplitting": {
"label": "Response Splitting"
},
"removeReasoningTagTTS": {
"label": "Remove Reasoning Tag from TTS"
}
}
},
Expand Down
6 changes: 4 additions & 2 deletions src/assets/locale/es/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,10 @@
},
"ssmlEnabled": {
"label": "Habilitar SSML (Speech Synthesis Markup Language)"
}
}
},
"removeReasoningTagTTS": {
"label": "Eliminar Etiqueta de Razonamiento del TTS"
} }
},
"manageModels": {
"title": "Administar de Modelos",
Expand Down
3 changes: 3 additions & 0 deletions src/assets/locale/fa/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@
},
"ssmlEnabled": {
"label": "فعال کردن SSML (Speech Synthesis Markup Language)"
},
"removeReasoningTagTTS": {
"label": "حذف برچسب استدلال از تبدیل متن به گفتار"
}
}
},
Expand Down
3 changes: 3 additions & 0 deletions src/assets/locale/fr/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@
},
"ssmlEnabled": {
"label": "Activer SSML (langage de balisage de synthèse vocale)"
},
"removeReasoningTagTTS": {
"label": "Supprimer la balise de raisonnement de la synthèse vocale"
}
}
},
Expand Down
3 changes: 3 additions & 0 deletions src/assets/locale/it/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@
},
"ssmlEnabled": {
"label": "Abilita SSML (Speech Synthesis Markup Language)"
},
"removeReasoningTagTTS": {
"label": "Rimuovi Tag di Ragionamento dal TTS"
}
}
},
Expand Down
3 changes: 3 additions & 0 deletions src/assets/locale/ja-JP/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@
},
"ssmlEnabled": {
"label": "SSML (Speech Synthesis Markup Language) を有効にする"
},
"removeReasoningTagTTS": {
"label": "テキスト読み上げから推論タグを削除"
}
}
},
Expand Down
3 changes: 3 additions & 0 deletions src/assets/locale/ko/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@
},
"ssmlEnabled": {
"label": "SSML (Speech Synthesis Markup Language) 활성화"
},
"removeReasoningTagTTS": {
"label": "TTS에서 추론 태그 제거"
}
}
},
Expand Down
3 changes: 3 additions & 0 deletions src/assets/locale/ml/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@
},
"ssmlEnabled": {
"label": "SSML (സ്പീച്ച് സിന്തസിസ് മാർക്കപ്പ് ലാംഗ്വേജ്) പ്രവർത്തനക്ഷമമാക്കുക"
},
"removeReasoningTagTTS": {
"label": "ടിടിഎസിൽ നിന്ന് റീസണിംഗ് ടാഗ് നീക്കം ചെയ്യുക"
}
}
},
Expand Down
3 changes: 3 additions & 0 deletions src/assets/locale/no/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@
},
"ssmlEnabled": {
"label": "Aktiver SSML (Speech Synthesis Markup Language)"
},
"removeReasoningTagTTS": {
"label": "Fjern Resonneringsmerke fra TTS"
}
}
},
Expand Down
3 changes: 3 additions & 0 deletions src/assets/locale/pt-BR/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@
},
"ssmlEnabled": {
"label": "Ativar SSML (Linguagem de Marcação de Síntese de Fala)"
},
"removeReasoningTagTTS": {
"label": "Remover Tag de Raciocínio do TTS"
}
}
},
Expand Down
3 changes: 3 additions & 0 deletions src/assets/locale/ru/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@
},
"ssmlEnabled": {
"label": "Включить SSML (язык разметки синтеза речи)"
},
"removeReasoningTagTTS": {
"label": "Удалить тег рассуждения из TTS"
}
}
},
Expand Down
3 changes: 3 additions & 0 deletions src/assets/locale/sv/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@
},
"ssmlEnabled": {
"label": "Aktivera SSML (Speech Synthesis Markup Language)"
},
"removeReasoningTagTTS": {
"label": "Ta bort resonemangstagg från Text till Tal"
}
}
},
Expand Down
3 changes: 3 additions & 0 deletions src/assets/locale/uk/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@
},
"ssmlEnabled": {
"label": "Ввімкнути SSML (Мова Розмітки для Синтезу Голосу)"
},
"removeReasoningTagTTS": {
"label": "Видалити тег міркування з TTS"
}
}
},
Expand Down
3 changes: 3 additions & 0 deletions src/assets/locale/zh/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@
},
"ssmlEnabled": {
"label": "启用SSML(语音合成标记语言)"
},
"removeReasoningTagTTS": {
"label": "从语音合成中移除推理标签"
}
}
},
Expand Down
6 changes: 6 additions & 0 deletions src/assets/tailwind.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
@layer utilities {
.mask-bottom-fade {
mask-image: linear-gradient(0deg, transparent 0, #000 160px);
-webkit-mask-image: linear-gradient(0deg, transparent 0, #000 160px);
}
}



Expand Down
75 changes: 51 additions & 24 deletions src/components/Common/CodeBlock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,36 @@ export const CodeBlock: FC<Props> = ({ language, value }) => {

return (
<>
<div className="code relative text-base font-sans codeblock bg-zinc-950 rounded-md overflow-hidden">
<div className="flex bg-gray-800 items-center justify-between py-1.5 px-4">
<span className="text-xs lowercase text-gray-200">{language}</span>
<div className="not-prose">
<div className=" [&_div+div]:!mt-0 my-4 bg-zinc-950 rounded-xl">
<div className="flex flex-row px-4 py-2 rounded-t-xl bg-gray-800 ">
<span className="font-mono text-xs">{language || "text"}</span>
</div>
<div className="sticky top-9 md:top-[5.75rem]">
<div className="absolute bottom-0 right-2 flex h-9 items-center">
<Tooltip title={t("downloadCode")}>
<button
onClick={handleDownload}
className="flex gap-1.5 items-center rounded bg-none p-1 text-xs text-gray-200 hover:bg-gray-700 hover:text-gray-100 focus:outline-none">
<DownloadIcon className="size-4" />
</button>
</Tooltip>
<Tooltip title={t("copyToClipboard")}>
<button
onClick={handleCopy}
className="flex gap-1.5 items-center rounded bg-none p-1 text-xs text-gray-200 hover:bg-gray-700 hover:text-gray-100 focus:outline-none">
{!isBtnPressed ? (
<ClipboardIcon className="size-4" />
) : (
<CheckIcon className="size-4 text-green-400" />
)}
</button>
</Tooltip>
</div>
</div>

{/* <div className="flex sticky bg-gray-800 items-center justify-between py-1.5 px-4">
<span className="text-xs lowercase text-gray-200">{language}</span>
<div className="flex items-center gap-2">
<Tooltip title={t("downloadCode")}>
<button
Expand All @@ -66,28 +92,29 @@ export const CodeBlock: FC<Props> = ({ language, value }) => {
</button>
</Tooltip>
</div>
</div> */}
<SyntaxHighlighter
language={language}
style={coldarkDark}
PreTag="div"
customStyle={{
margin: 0,
width: "100%",
background: "transparent",
padding: "1.5rem 1rem"
}}
lineNumberStyle={{
userSelect: "none"
}}
codeTagProps={{
style: {
fontSize: "0.9rem",
fontFamily: "var(--font-mono)"
}
}}>
{value}
</SyntaxHighlighter>
</div>
<SyntaxHighlighter
language={language}
style={coldarkDark}
PreTag="div"
customStyle={{
margin: 0,
width: "100%",
background: "transparent",
padding: "1.5rem 1rem"
}}
lineNumberStyle={{
userSelect: "none"
}}
codeTagProps={{
style: {
fontSize: "0.9rem",
fontFamily: "var(--font-mono)"
}
}}>
{value}
</SyntaxHighlighter>
</div>
{previewVisible && (
<Modal
Expand Down
3 changes: 3 additions & 0 deletions src/components/Common/Markdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ function Markdown({
remarkPlugins={[remarkGfm, remarkMath]}
rehypePlugins={[rehypeKatex]}
components={{
pre({ children }) {
return children
},
code({ node, inline, className, children, ...props }) {
const match = /language-(\w+)/.exec(className || "")
return !inline ? (
Expand Down
Loading

0 comments on commit de367a1

Please sign in to comment.