@emblemvault/hustle-react 1.5.0 → 1.5.2
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/browser/hustle-react.js +66 -26
- package/dist/browser/hustle-react.js.map +1 -1
- package/dist/components/index.cjs +42 -2
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.d.cts +6 -2
- package/dist/components/index.d.ts +6 -2
- package/dist/components/index.js +42 -2
- package/dist/components/index.js.map +1 -1
- package/dist/hooks/index.d.cts +2 -2
- package/dist/hooks/index.d.ts +2 -2
- package/dist/{hustle-C0Ltl5k4.d.cts → hustle-6WvUkY7K.d.cts} +1 -1
- package/dist/{hustle-C0Ltl5k4.d.ts → hustle-6WvUkY7K.d.ts} +1 -1
- package/dist/index.cjs +42 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +42 -2
- package/dist/index.js.map +1 -1
- package/dist/{plugin-COr42J6-.d.cts → plugin-DsYMoj_c.d.cts} +1 -1
- package/dist/{plugin-COr42J6-.d.ts → plugin-DsYMoj_c.d.ts} +1 -1
- package/dist/plugins/index.d.cts +1 -1
- package/dist/plugins/index.d.ts +1 -1
- package/dist/providers/index.d.cts +1 -1
- package/dist/providers/index.d.ts +1 -1
- package/package.json +13 -12
|
@@ -31,9 +31,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
31
31
|
));
|
|
32
32
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
33
33
|
|
|
34
|
-
// node_modules
|
|
34
|
+
// node_modules/highlight.js/lib/core.js
|
|
35
35
|
var require_core = __commonJS({
|
|
36
|
-
"node_modules
|
|
36
|
+
"node_modules/highlight.js/lib/core.js"(exports$1, module) {
|
|
37
37
|
function deepFreeze(obj) {
|
|
38
38
|
if (obj instanceof Map) {
|
|
39
39
|
obj.clear = obj.delete = obj.set = function() {
|
|
@@ -4776,7 +4776,7 @@ var animations = `
|
|
|
4776
4776
|
}
|
|
4777
4777
|
`;
|
|
4778
4778
|
|
|
4779
|
-
// node_modules
|
|
4779
|
+
// node_modules/marked/lib/marked.esm.js
|
|
4780
4780
|
function L() {
|
|
4781
4781
|
return { async: false, breaks: false, extensions: null, gfm: true, hooks: null, pedantic: false, renderer: null, silent: false, tokenizer: null, walkTokens: null };
|
|
4782
4782
|
}
|
|
@@ -5951,11 +5951,11 @@ d.parseInline;
|
|
|
5951
5951
|
b.parse;
|
|
5952
5952
|
x.lex;
|
|
5953
5953
|
|
|
5954
|
-
// node_modules
|
|
5954
|
+
// node_modules/highlight.js/es/core.js
|
|
5955
5955
|
var import_core = __toESM(require_core());
|
|
5956
5956
|
var core_default = import_core.default;
|
|
5957
5957
|
|
|
5958
|
-
// node_modules
|
|
5958
|
+
// node_modules/highlight.js/es/languages/javascript.js
|
|
5959
5959
|
var IDENT_RE = "[A-Za-z$_][0-9A-Za-z$_]*";
|
|
5960
5960
|
var KEYWORDS = [
|
|
5961
5961
|
"as",
|
|
@@ -6656,7 +6656,7 @@ function javascript(hljs) {
|
|
|
6656
6656
|
};
|
|
6657
6657
|
}
|
|
6658
6658
|
|
|
6659
|
-
// node_modules
|
|
6659
|
+
// node_modules/highlight.js/es/languages/typescript.js
|
|
6660
6660
|
var IDENT_RE2 = "[A-Za-z$_][0-9A-Za-z$_]*";
|
|
6661
6661
|
var KEYWORDS2 = [
|
|
6662
6662
|
"as",
|
|
@@ -7470,7 +7470,7 @@ function typescript(hljs) {
|
|
|
7470
7470
|
return tsLanguage;
|
|
7471
7471
|
}
|
|
7472
7472
|
|
|
7473
|
-
// node_modules
|
|
7473
|
+
// node_modules/highlight.js/es/languages/python.js
|
|
7474
7474
|
function python(hljs) {
|
|
7475
7475
|
const regex = hljs.regex;
|
|
7476
7476
|
const IDENT_RE3 = /[\p{XID_Start}_]\p{XID_Continue}*/u;
|
|
@@ -7885,7 +7885,7 @@ function python(hljs) {
|
|
|
7885
7885
|
};
|
|
7886
7886
|
}
|
|
7887
7887
|
|
|
7888
|
-
// node_modules
|
|
7888
|
+
// node_modules/highlight.js/es/languages/json.js
|
|
7889
7889
|
function json(hljs) {
|
|
7890
7890
|
const ATTRIBUTE = {
|
|
7891
7891
|
className: "attr",
|
|
@@ -7925,7 +7925,7 @@ function json(hljs) {
|
|
|
7925
7925
|
};
|
|
7926
7926
|
}
|
|
7927
7927
|
|
|
7928
|
-
// node_modules
|
|
7928
|
+
// node_modules/highlight.js/es/languages/bash.js
|
|
7929
7929
|
function bash(hljs) {
|
|
7930
7930
|
const regex = hljs.regex;
|
|
7931
7931
|
const VAR = {};
|
|
@@ -8319,7 +8319,7 @@ function bash(hljs) {
|
|
|
8319
8319
|
};
|
|
8320
8320
|
}
|
|
8321
8321
|
|
|
8322
|
-
// node_modules
|
|
8322
|
+
// node_modules/highlight.js/es/languages/shell.js
|
|
8323
8323
|
function shell(hljs) {
|
|
8324
8324
|
return {
|
|
8325
8325
|
name: "Shell Session",
|
|
@@ -8343,7 +8343,7 @@ function shell(hljs) {
|
|
|
8343
8343
|
};
|
|
8344
8344
|
}
|
|
8345
8345
|
|
|
8346
|
-
// node_modules
|
|
8346
|
+
// node_modules/highlight.js/es/languages/css.js
|
|
8347
8347
|
var MODES = (hljs) => {
|
|
8348
8348
|
return {
|
|
8349
8349
|
IMPORTANT: {
|
|
@@ -9280,7 +9280,7 @@ function css(hljs) {
|
|
|
9280
9280
|
};
|
|
9281
9281
|
}
|
|
9282
9282
|
|
|
9283
|
-
// node_modules
|
|
9283
|
+
// node_modules/highlight.js/es/languages/xml.js
|
|
9284
9284
|
function xml(hljs) {
|
|
9285
9285
|
const regex = hljs.regex;
|
|
9286
9286
|
const TAG_NAME_RE = regex.concat(/[\p{L}_]/u, regex.optional(/[\p{L}0-9_.-]*:/u), /[\p{L}0-9_.-]*/u);
|
|
@@ -9506,7 +9506,7 @@ function xml(hljs) {
|
|
|
9506
9506
|
};
|
|
9507
9507
|
}
|
|
9508
9508
|
|
|
9509
|
-
// node_modules
|
|
9509
|
+
// node_modules/highlight.js/es/languages/markdown.js
|
|
9510
9510
|
function markdown(hljs) {
|
|
9511
9511
|
const regex = hljs.regex;
|
|
9512
9512
|
const INLINE_HTML = {
|
|
@@ -9738,7 +9738,7 @@ function markdown(hljs) {
|
|
|
9738
9738
|
};
|
|
9739
9739
|
}
|
|
9740
9740
|
|
|
9741
|
-
// node_modules
|
|
9741
|
+
// node_modules/highlight.js/es/languages/sql.js
|
|
9742
9742
|
function sql(hljs) {
|
|
9743
9743
|
const regex = hljs.regex;
|
|
9744
9744
|
const COMMENT_MODE = hljs.COMMENT("--", "$");
|
|
@@ -10381,7 +10381,7 @@ function sql(hljs) {
|
|
|
10381
10381
|
};
|
|
10382
10382
|
}
|
|
10383
10383
|
|
|
10384
|
-
// node_modules
|
|
10384
|
+
// node_modules/highlight.js/es/languages/yaml.js
|
|
10385
10385
|
function yaml(hljs) {
|
|
10386
10386
|
const LITERALS3 = "true false yes no null";
|
|
10387
10387
|
const URI_CHARACTERS = "[\\w#;/?:@&=+$,.~*'()[\\]]+";
|
|
@@ -10582,7 +10582,7 @@ function yaml(hljs) {
|
|
|
10582
10582
|
};
|
|
10583
10583
|
}
|
|
10584
10584
|
|
|
10585
|
-
// node_modules
|
|
10585
|
+
// node_modules/highlight.js/es/languages/rust.js
|
|
10586
10586
|
function rust(hljs) {
|
|
10587
10587
|
const regex = hljs.regex;
|
|
10588
10588
|
const RAW_IDENTIFIER = /(r#)?/;
|
|
@@ -10895,7 +10895,7 @@ function rust(hljs) {
|
|
|
10895
10895
|
};
|
|
10896
10896
|
}
|
|
10897
10897
|
|
|
10898
|
-
// node_modules
|
|
10898
|
+
// node_modules/highlight.js/es/languages/go.js
|
|
10899
10899
|
function go(hljs) {
|
|
10900
10900
|
const LITERALS3 = [
|
|
10901
10901
|
"true",
|
|
@@ -11049,7 +11049,7 @@ function go(hljs) {
|
|
|
11049
11049
|
};
|
|
11050
11050
|
}
|
|
11051
11051
|
|
|
11052
|
-
// node_modules
|
|
11052
|
+
// node_modules/highlight.js/es/languages/java.js
|
|
11053
11053
|
var decimalDigits = "[0-9](_*[0-9])*";
|
|
11054
11054
|
var frac = `\\.(${decimalDigits})`;
|
|
11055
11055
|
var hexDigits = "[0-9a-fA-F](_*[0-9a-fA-F])*";
|
|
@@ -11303,7 +11303,7 @@ function java(hljs) {
|
|
|
11303
11303
|
};
|
|
11304
11304
|
}
|
|
11305
11305
|
|
|
11306
|
-
// node_modules
|
|
11306
|
+
// node_modules/highlight.js/es/languages/cpp.js
|
|
11307
11307
|
function cpp(hljs) {
|
|
11308
11308
|
const regex = hljs.regex;
|
|
11309
11309
|
const C_LINE_COMMENT_MODE = hljs.COMMENT("//", "$", { contains: [{ begin: /\\\n/ }] });
|
|
@@ -11846,7 +11846,7 @@ function cpp(hljs) {
|
|
|
11846
11846
|
};
|
|
11847
11847
|
}
|
|
11848
11848
|
|
|
11849
|
-
// node_modules
|
|
11849
|
+
// node_modules/highlight.js/es/languages/csharp.js
|
|
11850
11850
|
function csharp(hljs) {
|
|
11851
11851
|
const BUILT_IN_KEYWORDS = [
|
|
11852
11852
|
"bool",
|
|
@@ -12246,7 +12246,7 @@ function csharp(hljs) {
|
|
|
12246
12246
|
};
|
|
12247
12247
|
}
|
|
12248
12248
|
|
|
12249
|
-
// node_modules
|
|
12249
|
+
// node_modules/highlight.js/es/languages/php.js
|
|
12250
12250
|
function php(hljs) {
|
|
12251
12251
|
const regex = hljs.regex;
|
|
12252
12252
|
const NOT_PERL_ETC = /(?![A-Za-z0-9])(?![$])/;
|
|
@@ -12847,7 +12847,7 @@ function php(hljs) {
|
|
|
12847
12847
|
};
|
|
12848
12848
|
}
|
|
12849
12849
|
|
|
12850
|
-
// node_modules
|
|
12850
|
+
// node_modules/highlight.js/es/languages/ruby.js
|
|
12851
12851
|
function ruby(hljs) {
|
|
12852
12852
|
const regex = hljs.regex;
|
|
12853
12853
|
const RUBY_METHOD_RE = "([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)";
|
|
@@ -13260,7 +13260,7 @@ function ruby(hljs) {
|
|
|
13260
13260
|
};
|
|
13261
13261
|
}
|
|
13262
13262
|
|
|
13263
|
-
// node_modules
|
|
13263
|
+
// node_modules/highlight.js/es/languages/swift.js
|
|
13264
13264
|
function source(re2) {
|
|
13265
13265
|
if (!re2) return null;
|
|
13266
13266
|
if (typeof re2 === "string") return re2;
|
|
@@ -14135,7 +14135,7 @@ function swift(hljs) {
|
|
|
14135
14135
|
};
|
|
14136
14136
|
}
|
|
14137
14137
|
|
|
14138
|
-
// node_modules
|
|
14138
|
+
// node_modules/highlight.js/es/languages/kotlin.js
|
|
14139
14139
|
var decimalDigits2 = "[0-9](_*[0-9])*";
|
|
14140
14140
|
var frac2 = `\\.(${decimalDigits2})`;
|
|
14141
14141
|
var hexDigits2 = "[0-9a-fA-F](_*[0-9a-fA-F])*";
|
|
@@ -15265,6 +15265,8 @@ function HustleChat({
|
|
|
15265
15265
|
className = "",
|
|
15266
15266
|
placeholder = "Type a message...",
|
|
15267
15267
|
showSettings = false,
|
|
15268
|
+
settingsPanelOpen: controlledSettingsPanelOpen,
|
|
15269
|
+
onSettingsPanelOpenChange,
|
|
15268
15270
|
showDebug = false,
|
|
15269
15271
|
hideHeader = false,
|
|
15270
15272
|
initialSystemPrompt = "",
|
|
@@ -15304,7 +15306,17 @@ function HustleChat({
|
|
|
15304
15306
|
const [isStreaming, setIsStreaming] = useState(false);
|
|
15305
15307
|
const [attachments, setAttachments] = useState([]);
|
|
15306
15308
|
const [currentToolCalls, setCurrentToolCalls] = useState([]);
|
|
15307
|
-
const [
|
|
15309
|
+
const [internalShowSettingsPanel, setInternalShowSettingsPanel] = useState(false);
|
|
15310
|
+
const isSettingsControlled = controlledSettingsPanelOpen !== void 0;
|
|
15311
|
+
const showSettingsPanel = isSettingsControlled ? controlledSettingsPanelOpen : internalShowSettingsPanel;
|
|
15312
|
+
const setShowSettingsPanel = (open) => {
|
|
15313
|
+
const newValue = typeof open === "function" ? open(showSettingsPanel) : open;
|
|
15314
|
+
if (isSettingsControlled) {
|
|
15315
|
+
onSettingsPanelOpenChange?.(newValue);
|
|
15316
|
+
} else {
|
|
15317
|
+
setInternalShowSettingsPanel(newValue);
|
|
15318
|
+
}
|
|
15319
|
+
};
|
|
15308
15320
|
const [speechToTextEnabled, setSpeechToTextEnabled] = useState(() => {
|
|
15309
15321
|
if (typeof window !== "undefined") {
|
|
15310
15322
|
const stored = localStorage.getItem(`hustle-stt-enabled-${instanceId}`);
|
|
@@ -16177,6 +16189,12 @@ function CloseIcon() {
|
|
|
16177
16189
|
/* @__PURE__ */ jsx("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
|
|
16178
16190
|
] });
|
|
16179
16191
|
}
|
|
16192
|
+
function SettingsIcon2() {
|
|
16193
|
+
return /* @__PURE__ */ jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
|
|
16194
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "3" }),
|
|
16195
|
+
/* @__PURE__ */ jsx("path", { d: "M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z" })
|
|
16196
|
+
] });
|
|
16197
|
+
}
|
|
16180
16198
|
function ExpandIcon() {
|
|
16181
16199
|
return /* @__PURE__ */ jsxs("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
16182
16200
|
/* @__PURE__ */ jsx("polyline", { points: "15 3 21 3 21 9" }),
|
|
@@ -16225,6 +16243,8 @@ function HustleChatWidget({
|
|
|
16225
16243
|
const [isHovered, setIsHovered] = useState(false);
|
|
16226
16244
|
const [closeHovered, setCloseHovered] = useState(false);
|
|
16227
16245
|
const [mounted, setMounted] = useState(false);
|
|
16246
|
+
const [settingsOpen, setSettingsOpen] = useState(false);
|
|
16247
|
+
const { showSettings, ...restChatProps } = chatProps;
|
|
16228
16248
|
useEffect(() => {
|
|
16229
16249
|
setMounted(true);
|
|
16230
16250
|
if (storageKey && typeof window !== "undefined") {
|
|
@@ -16334,6 +16354,18 @@ function HustleChatWidget({
|
|
|
16334
16354
|
] })
|
|
16335
16355
|
] }),
|
|
16336
16356
|
/* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: tokens.spacing.xs }, children: [
|
|
16357
|
+
showSettings && /* @__PURE__ */ jsx(
|
|
16358
|
+
"button",
|
|
16359
|
+
{
|
|
16360
|
+
onClick: () => setSettingsOpen(!settingsOpen),
|
|
16361
|
+
style: {
|
|
16362
|
+
...widgetStyles.closeBtn,
|
|
16363
|
+
...settingsOpen ? { background: tokens.colors.bgSecondary } : {}
|
|
16364
|
+
},
|
|
16365
|
+
title: "Settings",
|
|
16366
|
+
children: /* @__PURE__ */ jsx(SettingsIcon2, {})
|
|
16367
|
+
}
|
|
16368
|
+
),
|
|
16337
16369
|
size === "sideDock" && /* @__PURE__ */ jsx(
|
|
16338
16370
|
"button",
|
|
16339
16371
|
{
|
|
@@ -16368,7 +16400,15 @@ function HustleChatWidget({
|
|
|
16368
16400
|
]
|
|
16369
16401
|
}
|
|
16370
16402
|
),
|
|
16371
|
-
/* @__PURE__ */ jsx("div", { style: { flex: 1, display: "flex", flexDirection: "column", overflow: "hidden" }, children: /* @__PURE__ */ jsx(
|
|
16403
|
+
/* @__PURE__ */ jsx("div", { style: { flex: 1, display: "flex", flexDirection: "column", overflow: "hidden" }, children: /* @__PURE__ */ jsx(
|
|
16404
|
+
HustleChatInner,
|
|
16405
|
+
{
|
|
16406
|
+
...restChatProps,
|
|
16407
|
+
showSettings,
|
|
16408
|
+
settingsPanelOpen: settingsOpen,
|
|
16409
|
+
onSettingsPanelOpenChange: setSettingsOpen
|
|
16410
|
+
}
|
|
16411
|
+
) })
|
|
16372
16412
|
]
|
|
16373
16413
|
}
|
|
16374
16414
|
),
|