lupacode 1.0.10 → 1.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +50 -36
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -47514,9 +47514,9 @@ function fallbackHighlight(content, filetype) {
|
|
|
47514
47514
|
[/`([^`\\]*(\\.[^`\\]*)*)`/g, "string"],
|
|
47515
47515
|
[/'([^'\\]*(\\.[^'\\]*)*)'/g, "string"],
|
|
47516
47516
|
[/\b(\d+(?:\.\d+)?)\b/g, "number"],
|
|
47517
|
-
[/<\/?(\w[\w-]*)[^>]*\/?>/g, "
|
|
47517
|
+
[/<\/?(\w[\w-]*)[^>]*\/?>/g, "tag"],
|
|
47518
47518
|
[/<!?-->/g, "comment"],
|
|
47519
|
-
[/\s(\w[\w-]*)=/g, "attribute"],
|
|
47519
|
+
[/\s(\w[\w-]*)=/g, "tag.attribute"],
|
|
47520
47520
|
[/(?:\.|#)([\w-]+)/g, "type"],
|
|
47521
47521
|
[/@[\w-]+/g, "builtin"]
|
|
47522
47522
|
];
|
|
@@ -47862,11 +47862,22 @@ class CodeRenderable extends TextBufferRenderable {
|
|
|
47862
47862
|
this.requestRender();
|
|
47863
47863
|
return;
|
|
47864
47864
|
}
|
|
47865
|
-
console.warn("Code highlighting failed, falling back to
|
|
47865
|
+
console.warn("Code highlighting failed, falling back to simple highlighting:", error);
|
|
47866
47866
|
if (this.isDestroyed)
|
|
47867
47867
|
return;
|
|
47868
|
-
|
|
47869
|
-
|
|
47868
|
+
const fallback2 = fallbackHighlight(content, filetype);
|
|
47869
|
+
if (fallback2.length > 0) {
|
|
47870
|
+
let chunks3 = treeSitterToTextChunks(content, fallback2, this._syntaxStyle, {
|
|
47871
|
+
enabled: this._conceal,
|
|
47872
|
+
baseHighlight: this._baseHighlight
|
|
47873
|
+
});
|
|
47874
|
+
const styledText3 = new StyledText(chunks3);
|
|
47875
|
+
this.textBuffer.setStyledText(styledText3);
|
|
47876
|
+
this.setRenderedLineSources(undefined);
|
|
47877
|
+
} else {
|
|
47878
|
+
this.textBuffer.setText(content);
|
|
47879
|
+
this.setRenderedLineSources(undefined);
|
|
47880
|
+
}
|
|
47870
47881
|
this._shouldRenderTextBuffer = true;
|
|
47871
47882
|
this._isHighlighting = false;
|
|
47872
47883
|
this._highlightsDirty = false;
|
|
@@ -96484,7 +96495,7 @@ var import_react35 = __toESM(require_react(), 1);
|
|
|
96484
96495
|
// package.json
|
|
96485
96496
|
var package_default2 = {
|
|
96486
96497
|
name: "lupacode",
|
|
96487
|
-
version: "1.0.
|
|
96498
|
+
version: "1.0.12",
|
|
96488
96499
|
description: "AI-powered terminal coding assistant",
|
|
96489
96500
|
type: "module",
|
|
96490
96501
|
bin: {
|
|
@@ -98625,41 +98636,44 @@ function prettyMilliseconds(milliseconds, options) {
|
|
|
98625
98636
|
// src/components/messages/bot-message.tsx
|
|
98626
98637
|
var globalSyntaxStyle = SyntaxStyle.fromStyles({
|
|
98627
98638
|
default: { fg: "#E4E4E7" },
|
|
98628
|
-
keyword: { fg: "#
|
|
98629
|
-
"keyword.control": { fg: "#
|
|
98630
|
-
"keyword.import": { fg: "#
|
|
98631
|
-
"keyword.function": { fg: "#
|
|
98632
|
-
string: { fg: "#
|
|
98633
|
-
"string.special": { fg: "#
|
|
98634
|
-
number: { fg: "#
|
|
98635
|
-
"number.float": { fg: "#
|
|
98636
|
-
comment: { fg: "#
|
|
98637
|
-
function: { fg: "#
|
|
98638
|
-
"function.call": { fg: "#
|
|
98639
|
-
"function.method": { fg: "#
|
|
98640
|
-
type: { fg: "#
|
|
98641
|
-
"type.builtin": { fg: "#
|
|
98639
|
+
keyword: { fg: "#FF79C6" },
|
|
98640
|
+
"keyword.control": { fg: "#FF79C6" },
|
|
98641
|
+
"keyword.import": { fg: "#FF79C6" },
|
|
98642
|
+
"keyword.function": { fg: "#57A6FF" },
|
|
98643
|
+
string: { fg: "#50FA7B" },
|
|
98644
|
+
"string.special": { fg: "#50FA7B" },
|
|
98645
|
+
number: { fg: "#F1FA8C" },
|
|
98646
|
+
"number.float": { fg: "#F1FA8C" },
|
|
98647
|
+
comment: { fg: "#6C7086", italic: true },
|
|
98648
|
+
function: { fg: "#57A6FF" },
|
|
98649
|
+
"function.call": { fg: "#57A6FF" },
|
|
98650
|
+
"function.method": { fg: "#57A6FF" },
|
|
98651
|
+
type: { fg: "#8BE9FD" },
|
|
98652
|
+
"type.builtin": { fg: "#8BE9FD" },
|
|
98642
98653
|
variable: { fg: "#F5F5F4" },
|
|
98643
|
-
"variable.parameter": { fg: "#
|
|
98644
|
-
"variable.builtin": { fg: "#
|
|
98645
|
-
constant: { fg: "#
|
|
98646
|
-
"constant.builtin": { fg: "#
|
|
98654
|
+
"variable.parameter": { fg: "#F1FA8C" },
|
|
98655
|
+
"variable.builtin": { fg: "#FF79C6" },
|
|
98656
|
+
constant: { fg: "#F1FA8C" },
|
|
98657
|
+
"constant.builtin": { fg: "#FF79C6" },
|
|
98647
98658
|
property: { fg: "#F5F5F4" },
|
|
98648
|
-
operator: { fg: "#
|
|
98659
|
+
operator: { fg: "#FF79C6" },
|
|
98649
98660
|
"punctuation.delimiter": { fg: "#A1A1AA" },
|
|
98650
98661
|
"punctuation.bracket": { fg: "#A1A1AA" },
|
|
98651
|
-
boolean: { fg: "#
|
|
98652
|
-
label: { fg: "#
|
|
98653
|
-
|
|
98662
|
+
boolean: { fg: "#F1FA8C" },
|
|
98663
|
+
label: { fg: "#50FA7B" },
|
|
98664
|
+
tag: { fg: "#FF5555" },
|
|
98665
|
+
"tag.attribute": { fg: "#FF79C6" },
|
|
98666
|
+
"tag.delimiter": { fg: "#FF79C6" },
|
|
98667
|
+
"markup.heading": { fg: "#FF79C6", bold: true },
|
|
98654
98668
|
"markup.italic": { italic: true },
|
|
98655
|
-
"markup.strong": { fg: "#
|
|
98656
|
-
"markup.strikethrough": { fg: "#
|
|
98657
|
-
"markup.raw": { fg: "#
|
|
98658
|
-
"markup.link": { fg: "#
|
|
98659
|
-
"markup.link.label": { fg: "#
|
|
98660
|
-
"markup.link.url": { fg: "#
|
|
98661
|
-
"markup.list": { fg: "#
|
|
98662
|
-
"markup.quote": { fg: "#
|
|
98669
|
+
"markup.strong": { fg: "#FF79C6", bold: true },
|
|
98670
|
+
"markup.strikethrough": { fg: "#6C7086", italic: true, dim: true },
|
|
98671
|
+
"markup.raw": { fg: "#50FA7B" },
|
|
98672
|
+
"markup.link": { fg: "#8BE9FD", underline: true },
|
|
98673
|
+
"markup.link.label": { fg: "#8BE9FD", underline: true },
|
|
98674
|
+
"markup.link.url": { fg: "#F1FA8C" },
|
|
98675
|
+
"markup.list": { fg: "#FF79C6" },
|
|
98676
|
+
"markup.quote": { fg: "#50FA7B", italic: true },
|
|
98663
98677
|
conceal: { fg: "#3F3F46" }
|
|
98664
98678
|
});
|
|
98665
98679
|
function formatToolName(name23) {
|