Merge branch 'main' into hefty-hype

This commit is contained in:
end-4
2026-04-04 23:33:46 +02:00
3 changed files with 19 additions and 12 deletions
@@ -1,5 +1,8 @@
## Style
- Use casual tone, don't be formal! Make sure you answer precisely without hallucination and prefer bullet points over walls of text. You can have a friendly greeting at the beginning of the conversation, but don't repeat the user's question
- Use casual tone, don't be formal!
- Always be brief and to the point, unless asked otherwise
- Don't repeat the user's question
- Be approachable: Avoid using overly complicated, domain-specific terms and provide analogies when asked to explain a concept
## Context (ignore when irrelevant)
- You are a helpful and inspiring sidebar assistant on a {DISTRO} Linux system
@@ -93,7 +93,7 @@ Singleton {
}
property JsonObject ai: JsonObject {
property string systemPrompt: "## Style\n- Use casual tone, don't be formal! Make sure you answer precisely without hallucination and prefer bullet points over walls of text. You can have a friendly greeting at the beginning of the conversation, but don't repeat the user's question\n\n## Context (ignore when irrelevant)\n- You are a helpful and inspiring sidebar assistant on a {DISTRO} Linux system\n- Desktop environment: {DE}\n- Current date & time: {DATETIME}\n- Focused app: {WINDOWCLASS}\n\n## Presentation\n- Use Markdown features in your response: \n - **Bold** text to **highlight keywords** in your response\n - **Split long information into small sections** with h2 headers and a relevant emoji at the start of it (for example `## 🐧 Linux`). Bullet points are preferred over long paragraphs, unless you're offering writing support or instructed otherwise by the user.\n- Asked to compare different options? You should firstly use a table to compare the main aspects, then elaborate or include relevant comments from online forums *after* the table. Make sure to provide a final recommendation for the user's use case!\n- Use LaTeX formatting for mathematical and scientific notations whenever appropriate. Enclose all LaTeX '$$' delimiters. NEVER generate LaTeX code in a latex block unless the user explicitly asks for it. DO NOT use LaTeX for regular documents (resumes, letters, essays, CVs, etc.).\n"
property string systemPrompt: "## Style\n- Use casual tone, don't be formal!\n- Always be brief and to the point, unless asked otherwise\n- Don't repeat the user's question\n- Be approachable: Avoid using overly complicated, domain-specific terms and provide analogies when asked to explain a concept\n\n## Context (ignore when irrelevant)\n- You are a helpful and inspiring sidebar assistant on a {DISTRO} Linux system\n- Desktop environment: {DE}\n- Current date & time: {DATETIME}\n- Focused app: {WINDOWCLASS}\n\n## Presentation\n- Use Markdown features in your response: \n - **Bold** text to **highlight keywords** in your response\n - **Split long information into small sections** with h2 headers and a relevant emoji at the start of it (for example `## 🐧 Linux`). Bullet points are preferred over long paragraphs, unless you're offering writing support or instructed otherwise by the user.\n- Asked to compare different options? You should firstly use a table to compare the main aspects, then elaborate or include relevant comments from online forums *after* the table. Make sure to provide a final recommendation for the user's use case!\n- Use LaTeX formatting for mathematical and scientific notations whenever appropriate. Enclose all LaTeX '$$' delimiters. NEVER generate LaTeX code in a latex block unless the user explicitly asks for it. DO NOT use LaTeX for regular documents (resumes, letters, essays, CVs, etc.).\n\nThanks!\n"
property string tool: "functions" // search, functions, or none
property list<var> extraModels: [
{
@@ -40,18 +40,22 @@ RippleButton {
property int buttonHorizontalPadding: 10
property int buttonVerticalPadding: 6
property bool keyboardDown: false
readonly property bool selected: (root.hovered || root.focus)
implicitHeight: rowLayout.implicitHeight + root.buttonVerticalPadding * 2
implicitWidth: rowLayout.implicitWidth + root.buttonHorizontalPadding * 2
buttonRadius: Appearance.rounding.normal
colBackground: (root.down || root.keyboardDown) ? Appearance.colors.colPrimaryContainerActive :
((root.hovered || root.focus) ? Appearance.colors.colPrimaryContainer :
(selected ? Appearance.colors.colPrimaryContainer :
ColorUtils.transparentize(Appearance.colors.colPrimaryContainer, 1))
colBackgroundHover: Appearance.colors.colPrimaryContainer
colRipple: Appearance.colors.colPrimaryContainerActive
property color colForeground: selected ? Appearance.colors.colOnPrimaryContainer : Appearance.m3colors.m3onSurface
property string highlightPrefix: `<u><font color="${Appearance.colors.colPrimary}">`
property string highlightSuffix: `</font></u>`
readonly property string highlightPrefix: `<u><font color="${Appearance.colors.colPrimary}">`
readonly property string highlightSuffix: `</font></u>`
// Note that this highlighting is independent from the search
// It's close, but does not accurately represent how the fuzzy algorithm works
function highlightContent(content, query) {
if (!query || query.length === 0 || content == query || fontType === "monospace")
return StringUtils.escapeHtml(content);
@@ -162,7 +166,7 @@ RippleButton {
MaterialSymbol {
text: root.materialSymbol
iconSize: 30
color: Appearance.m3colors.m3onSurface
color: root.colForeground
}
}
@@ -171,7 +175,7 @@ RippleButton {
StyledText {
text: root.bigText
font.pixelSize: Appearance.font.pixelSize.larger
color: Appearance.m3colors.m3onSurface
color: root.colForeground
}
}
@@ -183,7 +187,7 @@ RippleButton {
spacing: 0
StyledText {
font.pixelSize: Appearance.font.pixelSize.smaller
color: Appearance.colors.colSubtext
color: root.selected ? Appearance.colors.colOnPrimaryContainer : Appearance.colors.colSubtext
visible: root.itemType && root.itemType != Translation.tr("App")
text: root.itemType
}
@@ -219,10 +223,10 @@ RippleButton {
textFormat: Text.StyledText // RichText also works, but StyledText ensures elide work
font.pixelSize: Appearance.font.pixelSize.small
font.family: Appearance.font.family[root.fontType]
color: Appearance.m3colors.m3onSurface
color: root.colForeground
horizontalAlignment: Text.AlignLeft
elide: Text.ElideRight
text: `${root.displayContent}`
text: root.selected ? root.itemName : root.displayContent
}
}
Loader { // Clipboard image preview
@@ -240,7 +244,7 @@ RippleButton {
// Action text
StyledText {
Layout.fillWidth: false
visible: (root.hovered || root.focus)
visible: root.selected
id: clickAction
font.pixelSize: Appearance.font.pixelSize.normal
color: Appearance.colors.colOnPrimaryContainer
@@ -275,7 +279,7 @@ RippleButton {
sourceComponent: MaterialSymbol {
text: actionButton.iconName || "video_settings"
font.pixelSize: Appearance.font.pixelSize.hugeass
color: Appearance.m3colors.m3onSurface
color: root.colForeground
}
}
Loader {