{"_id":"@ai-hud/chat-enabled","_rev":"9-acee2550e8c4aea4af19ecde3523161d","name":"@ai-hud/chat-enabled","dist-tags":{"latest":"0.1.8"},"versions":{"0.1.0":{"name":"@ai-hud/chat-enabled","version":"0.1.0","author":"","license":"MIT","_id":"@ai-hud/chat-enabled@0.1.0","maintainers":[{"name":"harshalgajjar","email":"harshalg98@gmail.com"}],"homepage":"https://github.com/harshal/ai-hud#readme","bugs":{"url":"https://github.com/harshal/ai-hud/issues"},"dist":{"shasum":"4b169ed1a16229594a08100f5482a4cc9eb79db2","tarball":"https://registry.npmjs.org/@ai-hud/chat-enabled/-/chat-enabled-0.1.0.tgz","fileCount":9,"integrity":"sha512-hWC7dZ/iwzCCVqR4nQXvj+p+O1lQv6k8NRoMl/ui0+htgVqaY7wR5iccYN6QLultERx21aOwD/GIE/wiwZ0jCw==","signatures":[{"sig":"MEUCIH78/oEv2Ru3mdixVNo80vfTUPcgYe4GHCI8tlq089fKAiEArP8EXl0HKvCdzJjf9eTGPSg/zuAQIJJzAjIhWQj4sGU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":10019168},"main":"dist/index.cjs","tsup":{"dts":true,"clean":true,"entry":["src/index.ts"],"format":["esm","cjs"],"minify":true,"external":["react","react-dom"],"sourcemap":true,"splitting":false,"noExternal":["html2canvas","@langchain/core","@langchain/openai"]},"type":"module","types":"dist/index.d.ts","module":"dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"c452738daf48093348f0ed8a8e7b6feda3aaf103","private":false,"scripts":{"dev":"tsup --watch","build":"tsup","clean":"rm -rf dist"},"_npmUser":{"name":"harshalgajjar","email":"harshalg98@gmail.com"},"repository":{"url":"git+https://github.com/harshal/ai-hud.git","type":"git"},"_npmVersion":"10.9.2","description":"A lightweight React wrapper that shows a hover chat button around its children.","directories":{},"sideEffects":false,"_nodeVersion":"23.10.0","dependencies":{"html2canvas":"^1.4.1","@langchain/core":"^0.3.75","@langchain/openai":"^0.6.11"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","typescript":"^5.9.2","@types/react":"^18.3.24","@types/react-dom":"^18.3.7"},"peerDependencies":{"react":">=17","react-dom":">=17"},"_npmOperationalInternal":{"tmp":"tmp/chat-enabled_0.1.0_1758265337268_0.17093728682340137","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@ai-hud/chat-enabled","version":"0.1.1","author":"","license":"MIT","_id":"@ai-hud/chat-enabled@0.1.1","maintainers":[{"name":"harshalgajjar","email":"harshalg98@gmail.com"}],"homepage":"https://github.com/harshal/ai-hud#readme","bugs":{"url":"https://github.com/harshal/ai-hud/issues"},"dist":{"shasum":"81b0ac1e4446a14a386c8514f6e48d74393b66a5","tarball":"https://registry.npmjs.org/@ai-hud/chat-enabled/-/chat-enabled-0.1.1.tgz","fileCount":9,"integrity":"sha512-A6SAyiFQgspTNMO5+NPx6iM4KfySh9uiNJ0j8wUIsESayYF0tPUM1AuPPQybLV/xbM0PS1G8COHgyae+0YGAmA==","signatures":[{"sig":"MEUCIQDbgusG6sNyQAwVJeEsLoP+mDyB201ktpEJa2ypOn+aiQIgI3eBeBm82XygkxWtSfSdGwPZDXRobzo1yfYDRH1GwwQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":10035916},"main":"dist/index.cjs","tsup":{"dts":true,"clean":true,"entry":["src/index.ts"],"format":["esm","cjs"],"minify":true,"external":["react","react-dom"],"platform":"browser","sourcemap":true,"splitting":false,"noExternal":["html2canvas","@langchain/core","@langchain/openai"]},"type":"module","types":"dist/index.d.ts","module":"dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"257a03062acc85ffd68562d7ef61fe7135f401d8","private":false,"scripts":{"dev":"tsup --watch","build":"tsup","clean":"rm -rf dist"},"_npmUser":{"name":"harshalgajjar","email":"harshalg98@gmail.com"},"repository":{"url":"git+https://github.com/harshal/ai-hud.git","type":"git"},"_npmVersion":"10.9.2","description":"A lightweight React wrapper that shows a hover chat button around its children.","directories":{},"sideEffects":false,"_nodeVersion":"23.10.0","dependencies":{"html2canvas":"^1.4.1","@langchain/core":"^0.3.75","@langchain/openai":"^0.6.11"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","typescript":"^5.9.2","@types/react":"^18.3.24","@types/react-dom":"^18.3.7"},"peerDependencies":{"react":">=17","react-dom":">=17"},"_npmOperationalInternal":{"tmp":"tmp/chat-enabled_0.1.1_1758266891938_0.8858453059427593","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@ai-hud/chat-enabled","version":"0.1.2","author":"","license":"MIT","_id":"@ai-hud/chat-enabled@0.1.2","maintainers":[{"name":"harshalgajjar","email":"harshalg98@gmail.com"}],"homepage":"https://github.com/harshalgajjar/ai-hud#readme","bugs":{"url":"https://github.com/harshalgajjar/ai-hud/issues"},"dist":{"shasum":"f0789e16ba85a19822622f3de5f088006160ae11","tarball":"https://registry.npmjs.org/@ai-hud/chat-enabled/-/chat-enabled-0.1.2.tgz","fileCount":9,"integrity":"sha512-VY/r8DYk775S7NytB2/VsuEmO2VvDjzWhIrIxTs4MPJl5C4XUcFMEYvPclrSg0hNZulqdpAy6xTDdpKRBJB3DA==","signatures":[{"sig":"MEYCIQDNC0wLSmpjd0ykOkp5S1s322QSkmOS4nZzAsBrUCF1DQIhAK8cm1mdd7rKhllCnTH11qqht4sQGerb/qpuMEl0z4Ch","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":10035934},"main":"dist/index.cjs","tsup":{"dts":true,"clean":true,"entry":["src/index.ts"],"format":["esm","cjs"],"minify":true,"external":["react","react-dom"],"platform":"browser","sourcemap":true,"splitting":false,"noExternal":["html2canvas","@langchain/core","@langchain/openai"]},"type":"module","types":"dist/index.d.ts","module":"dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"19070f17bd102209d877564efc60932f26e9258e","private":false,"scripts":{"dev":"tsup --watch","build":"tsup","clean":"rm -rf dist"},"_npmUser":{"name":"harshalgajjar","email":"harshalg98@gmail.com"},"repository":{"url":"git+https://github.com/harshalgajjar/ai-hud.git","type":"git"},"_npmVersion":"10.9.2","description":"A lightweight React wrapper that shows a hover chat button around its children.","directories":{},"sideEffects":false,"_nodeVersion":"23.10.0","dependencies":{"html2canvas":"^1.4.1","@langchain/core":"^0.3.75","@langchain/openai":"^0.6.11"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","typescript":"^5.9.2","@types/react":"^18.3.24","@types/react-dom":"^18.3.7"},"peerDependencies":{"react":">=17","react-dom":">=17"},"_npmOperationalInternal":{"tmp":"tmp/chat-enabled_0.1.2_1758267060766_0.19469563127690326","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@ai-hud/chat-enabled","version":"0.1.3","author":"","license":"MIT","_id":"@ai-hud/chat-enabled@0.1.3","maintainers":[{"name":"harshalgajjar","email":"harshalg98@gmail.com"}],"homepage":"https://github.com/harshalgajjar/ai-hud#readme","bugs":{"url":"https://github.com/harshalgajjar/ai-hud/issues"},"dist":{"shasum":"b0e7268a1cdbf7cb6bde64ac89649c6d85a5b3b6","tarball":"https://registry.npmjs.org/@ai-hud/chat-enabled/-/chat-enabled-0.1.3.tgz","fileCount":9,"integrity":"sha512-T1vpo6LmnqPOpahJ1xgxI0PE64Vuix+qjFxJ19LSlY4dDEzZRYSHEkSj5f0dL8JaVOWl4ar+KwGtazZ9P74h3w==","signatures":[{"sig":"MEUCIQDjyubrY2GuuyAqt+Y9VEHVgNQtT4lUL0pbdGlTZfs0XgIgQEssIVR/1qwa4lJPD32zTqY+BAMqC3LxQP4bJ7fwud0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":10035913},"main":"dist/index.cjs","tsup":{"dts":true,"clean":true,"entry":["src/index.ts"],"format":["esm","cjs"],"minify":true,"external":["react","react-dom"],"platform":"browser","sourcemap":true,"splitting":false,"noExternal":["html2canvas","@langchain/core","@langchain/openai"]},"type":"module","types":"dist/index.d.ts","module":"dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"eff57dcdee0d3eb67d20333e64fbff3f55dbdebc","private":false,"scripts":{"dev":"tsup --watch","build":"tsup","clean":"rm -rf dist"},"_npmUser":{"name":"harshalgajjar","email":"harshalg98@gmail.com"},"repository":{"url":"git+https://github.com/harshalgajjar/ai-hud.git","type":"git"},"_npmVersion":"10.9.2","description":"A lightweight React wrapper that shows a hover chat button around its children.","directories":{},"sideEffects":false,"_nodeVersion":"23.10.0","dependencies":{"html2canvas":"^1.4.1","@langchain/core":"^0.3.75","@langchain/openai":"^0.6.11"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","typescript":"^5.9.2","@types/react":"^18.3.24","@types/react-dom":"^18.3.7"},"peerDependencies":{"react":">=17","react-dom":">=17"},"_npmOperationalInternal":{"tmp":"tmp/chat-enabled_0.1.3_1758267271592_0.9377365542371765","host":"s3://npm-registry-packages-npm-production"}},"0.1.4":{"name":"@ai-hud/chat-enabled","version":"0.1.4","author":"","license":"MIT","_id":"@ai-hud/chat-enabled@0.1.4","maintainers":[{"name":"harshalgajjar","email":"harshalg98@gmail.com"}],"homepage":"https://github.com/harshalgajjar/ai-hud#readme","bugs":{"url":"https://github.com/harshalgajjar/ai-hud/issues"},"dist":{"shasum":"fd1c6c88b6896e4154c33c82d953519122c045b4","tarball":"https://registry.npmjs.org/@ai-hud/chat-enabled/-/chat-enabled-0.1.4.tgz","fileCount":9,"integrity":"sha512-lweLfxMer02NxiPiPuqVB3S0Hlld3ACBQfx2kBQCPttacCTpkH1o1A+D+h0RPtPGcw1UX+g8ofvT/oX4U7sLJA==","signatures":[{"sig":"MEQCIG+Mde2VHai+jVFLKnSTxoeRVtr5TJV3y4hGpqbiFJ4wAiBQQ0zNh7/RhRDaPts1qDfhGvi3vThNSZUZoahbNyFWng==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":10035913},"main":"dist/index.cjs","tsup":{"dts":true,"clean":true,"entry":["src/index.ts"],"format":["esm","cjs"],"minify":true,"external":["react","react-dom"],"platform":"browser","sourcemap":true,"splitting":false,"noExternal":["html2canvas","@langchain/core","@langchain/openai"]},"type":"module","types":"dist/index.d.ts","module":"dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"40be2631a40b32dc5d2cc7a6d581203d0bc6625b","private":false,"scripts":{"dev":"tsup --watch","build":"tsup","clean":"rm -rf dist"},"_npmUser":{"name":"harshalgajjar","email":"harshalg98@gmail.com"},"repository":{"url":"git+https://github.com/harshalgajjar/ai-hud.git","type":"git"},"_npmVersion":"10.9.2","description":"A lightweight React wrapper that shows a hover chat button around its children.","directories":{},"sideEffects":false,"_nodeVersion":"23.10.0","dependencies":{"html2canvas":"^1.4.1","@langchain/core":"^0.3.75","@langchain/openai":"^0.6.11"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","typescript":"^5.9.2","@types/react":"^18.3.24","@types/react-dom":"^18.3.7"},"peerDependencies":{"react":">=17","react-dom":">=17"},"_npmOperationalInternal":{"tmp":"tmp/chat-enabled_0.1.4_1758268148338_0.834072877616806","host":"s3://npm-registry-packages-npm-production"}},"0.1.5":{"name":"@ai-hud/chat-enabled","version":"0.1.5","author":"","license":"MIT","_id":"@ai-hud/chat-enabled@0.1.5","maintainers":[{"name":"harshalgajjar","email":"harshalg98@gmail.com"}],"homepage":"https://github.com/harshalgajjar/ai-hud#readme","bugs":{"url":"https://github.com/harshalgajjar/ai-hud/issues"},"dist":{"shasum":"a73be9c47bcb20336fb52f49d0d3bcfe50e4c0a6","tarball":"https://registry.npmjs.org/@ai-hud/chat-enabled/-/chat-enabled-0.1.5.tgz","fileCount":9,"integrity":"sha512-1iqMvD1ytRdJW7GRZ5IrewnKh4YH9njDIERcUBcpE5Idaz7JQTrmbk0GMlNqCYgW7gM7FWd1E67j2WiwQZCscA==","signatures":[{"sig":"MEUCIH644T7F6CZRSMYrACDonXa4i5jIHo96VDYYkDCGmWq6AiEAupgWQbpFRix0p8LRsm5z4T5jxHrEoolZHT0dDYuItEY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":10035913},"main":"dist/index.cjs","tsup":{"dts":true,"clean":true,"entry":["src/index.ts"],"format":["esm","cjs"],"minify":true,"external":["react","react-dom"],"platform":"browser","sourcemap":true,"splitting":false,"noExternal":["html2canvas","@langchain/core","@langchain/openai"]},"type":"module","types":"dist/index.d.ts","module":"dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"c322db4760f600df7771f040d505fefd775363fb","private":false,"scripts":{"dev":"tsup --watch","build":"tsup","clean":"rm -rf dist"},"_npmUser":{"name":"harshalgajjar","email":"harshalg98@gmail.com"},"repository":{"url":"git+https://github.com/harshalgajjar/ai-hud.git","type":"git"},"_npmVersion":"10.9.2","description":"A lightweight React wrapper that shows a hover chat button around its children.","directories":{},"sideEffects":false,"_nodeVersion":"23.10.0","dependencies":{"html2canvas":"^1.4.1","@langchain/core":"^0.3.75","@langchain/openai":"^0.6.11"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","typescript":"^5.9.2","@types/react":"^18.3.24","@types/react-dom":"^18.3.7"},"peerDependencies":{"react":">=17","react-dom":">=17"},"_npmOperationalInternal":{"tmp":"tmp/chat-enabled_0.1.5_1758268439024_0.9487429832012859","host":"s3://npm-registry-packages-npm-production"}},"0.1.6":{"name":"@ai-hud/chat-enabled","version":"0.1.6","author":"","license":"MIT","_id":"@ai-hud/chat-enabled@0.1.6","maintainers":[{"name":"harshalgajjar","email":"harshalg98@gmail.com"}],"homepage":"https://github.com/harshalgajjar/ai-hud#readme","bugs":{"url":"https://github.com/harshalgajjar/ai-hud/issues"},"dist":{"shasum":"93947b19df5c49c5879ad2c47352da8d2fe485bd","tarball":"https://registry.npmjs.org/@ai-hud/chat-enabled/-/chat-enabled-0.1.6.tgz","fileCount":9,"integrity":"sha512-9eNe9TBZqWC6WzECcvA35Zdbf61eYj2CCr8ylqDE3r27vFHhk9Z5KdSwBJacXJtY7AmyWRkP1GQvDVsVyQbcKg==","signatures":[{"sig":"MEYCIQCA2exaAIVQzETSha82mVEKAJ/7vsIJs1e3CFmjPGfteQIhAPzZ2s+/mN7TpQPanVqsrHwNXynhtc65NvOHBP67z8E6","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":10036629},"main":"dist/index.cjs","tsup":{"dts":true,"clean":true,"entry":["src/index.ts"],"format":["esm","cjs"],"minify":true,"external":["react","react-dom"],"platform":"browser","sourcemap":true,"splitting":false,"noExternal":["html2canvas","@langchain/core","@langchain/openai"]},"type":"module","types":"dist/index.d.ts","module":"dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"922b117ff27a535a42fd3eafffb5098c20f0b4e1","private":false,"scripts":{"dev":"tsup --watch","build":"tsup","clean":"rm -rf dist"},"_npmUser":{"name":"harshalgajjar","email":"harshalg98@gmail.com"},"repository":{"url":"git+https://github.com/harshalgajjar/ai-hud.git","type":"git"},"_npmVersion":"10.9.2","description":"A lightweight React wrapper that shows a hover chat button around its children.","directories":{},"sideEffects":false,"_nodeVersion":"23.10.0","dependencies":{"html2canvas":"^1.4.1","@langchain/core":"^0.3.75","@langchain/openai":"^0.6.11"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","typescript":"^5.9.2","@types/react":"^18.3.24","@types/react-dom":"^18.3.7"},"peerDependencies":{"react":">=17","react-dom":">=17"},"_npmOperationalInternal":{"tmp":"tmp/chat-enabled_0.1.6_1758270838210_0.12072631259404831","host":"s3://npm-registry-packages-npm-production"}},"0.1.7":{"name":"@ai-hud/chat-enabled","version":"0.1.7","author":"","license":"MIT","_id":"@ai-hud/chat-enabled@0.1.7","maintainers":[{"name":"harshalgajjar","email":"harshalg98@gmail.com"}],"homepage":"https://github.com/harshalgajjar/ai-hud#readme","bugs":{"url":"https://github.com/harshalgajjar/ai-hud/issues"},"dist":{"shasum":"3899e250723346423b1b6ca843afe3fa015788fb","tarball":"https://registry.npmjs.org/@ai-hud/chat-enabled/-/chat-enabled-0.1.7.tgz","fileCount":9,"integrity":"sha512-+CNws4IJ7XT5SE0S6jvz9lIwYyI+DpC3vC97dm609z0d2PDGkz8QdAxtiTMcqWt8KP68IKvfpGbsNuBN6SrQUA==","signatures":[{"sig":"MEQCIHnzlNIj0NvII6PXkd/Jj8Nnmu+o6Lgzn76iJkGF3ZpEAiBkc/vkmvG0dvcaeMlG5JGHStmQNnPmw/4B1cTRg4r8tQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":10036697},"main":"dist/index.cjs","tsup":{"dts":true,"clean":true,"entry":["src/index.ts"],"format":["esm","cjs"],"minify":true,"external":["react","react-dom"],"platform":"browser","sourcemap":true,"splitting":false,"noExternal":["html2canvas","@langchain/core","@langchain/openai"]},"type":"module","types":"dist/index.d.ts","module":"dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"47856e92e9e91f130c57dfe639902ae0fec0c4fb","private":false,"scripts":{"dev":"tsup --watch","build":"tsup","clean":"rm -rf dist"},"_npmUser":{"name":"harshalgajjar","email":"harshalg98@gmail.com"},"repository":{"url":"git+https://github.com/harshalgajjar/ai-hud.git","type":"git"},"_npmVersion":"10.9.2","description":"A lightweight React wrapper that shows a hover chat button around its children.","directories":{},"sideEffects":false,"_nodeVersion":"23.10.0","dependencies":{"html2canvas":"^1.4.1","@langchain/core":"^0.3.75","@langchain/openai":"^0.6.11"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","typescript":"^5.9.2","@types/react":"^18.3.24","@types/react-dom":"^18.3.7"},"peerDependencies":{"react":">=17","react-dom":">=17"},"_npmOperationalInternal":{"tmp":"tmp/chat-enabled_0.1.7_1758271323891_0.4120942502937155","host":"s3://npm-registry-packages-npm-production"}},"0.1.8":{"name":"@ai-hud/chat-enabled","version":"0.1.8","private":false,"description":"A lightweight React wrapper that shows a hover chat button around its children.","license":"EPL-2.0","author":"","repository":{"type":"git","url":"git+https://github.com/harshalgajjar/ai-hud.git"},"bugs":{"url":"https://github.com/harshalgajjar/ai-hud/issues"},"homepage":"https://github.com/harshalgajjar/ai-hud#readme","type":"module","main":"dist/index.cjs","module":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"sideEffects":false,"dependencies":{"@langchain/core":"^0.3.75","@langchain/openai":"^0.6.11","html2canvas":"^1.4.1"},"peerDependencies":{"react":">=17","react-dom":">=17"},"devDependencies":{"@types/react":"^18.3.24","@types/react-dom":"^18.3.7","tsup":"^8.5.0","typescript":"^5.9.2"},"scripts":{"build":"tsup","dev":"tsup --watch","clean":"rm -rf dist"},"tsup":{"entry":["src/index.ts"],"format":["esm","cjs"],"platform":"browser","dts":true,"splitting":false,"sourcemap":true,"minify":true,"clean":true,"external":["react","react-dom"],"noExternal":["html2canvas","@langchain/core","@langchain/openai"]},"publishConfig":{"access":"public"},"_id":"@ai-hud/chat-enabled@0.1.8","gitHead":"95f28ef725330799895474923e7f94e1bdffede4","_nodeVersion":"23.10.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-sJ55gZJbY0YUVb98meVsTDdRYW8L5xJboY3l/0MUKf1g+bXjZ1iCWrYO8TFxy8fP+2238Og4AVpyfBlLDRds/Q==","shasum":"ed544439d3c8273ff35458a8bbd0f86a2f15ddd9","tarball":"https://registry.npmjs.org/@ai-hud/chat-enabled/-/chat-enabled-0.1.8.tgz","fileCount":9,"unpackedSize":10036701,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDJ39gTDnoCR8BwrTQ/5HdbnEpTbJRnjOSjxgdJmAwjUgIhAMK8vlUWtRLyN+aaP5ceN6s0nzaH8MRpqSNwLIrppCNx"}]},"_npmUser":{"name":"harshalgajjar","email":"harshalg98@gmail.com"},"directories":{},"maintainers":[{"name":"harshalgajjar","email":"harshalg98@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/chat-enabled_0.1.8_1758271519927_0.09035059539848667"},"_hasShrinkwrap":false}},"time":{"created":"2025-09-19T07:02:17.167Z","modified":"2025-09-19T08:45:20.376Z","0.1.0":"2025-09-19T07:02:17.479Z","0.1.1":"2025-09-19T07:28:12.183Z","0.1.2":"2025-09-19T07:31:00.993Z","0.1.3":"2025-09-19T07:34:31.842Z","0.1.4":"2025-09-19T07:49:08.582Z","0.1.5":"2025-09-19T07:53:59.253Z","0.1.6":"2025-09-19T08:33:58.431Z","0.1.7":"2025-09-19T08:42:04.126Z","0.1.8":"2025-09-19T08:45:20.164Z"},"bugs":{"url":"https://github.com/harshalgajjar/ai-hud/issues"},"license":"EPL-2.0","homepage":"https://github.com/harshalgajjar/ai-hud#readme","repository":{"type":"git","url":"git+https://github.com/harshalgajjar/ai-hud.git"},"description":"A lightweight React wrapper that shows a hover chat button around its children.","maintainers":[{"name":"harshalgajjar","email":"harshalg98@gmail.com"}],"readme":"## @ai-hud/chat-enabled\n\nA lightweight React component wrapper that allows for chatting with components, it's data and with any additional context.\n\n### Scope\n\nPass context as a json object\n<!-- ![Context](assets/json_context_gif.gif) -->\n<img src=\"assets/json_context_gif.gif\" width=\"360px\">\n\nPass (more) context as a screenshot of the component\n<!-- ![Visual context](assets/visual_context_gif.gif) -->\n<img src=\"assets/visual_context_gif.gif\" width=\"360px\">\n\nEmpower llm with tools\n<!-- ![Tool calling](assets/tools_gif.gif) -->\n<img src=\"assets/tools_gif.gif\" width=\"360px\">\n\nTry here: [https://ai-hud.vercel.app/](https://ai-hud.vercel.app/)\n\n### Installation\n\n```bash\nnpm i @ai-hud/chat-enabled\n# or\nyarn add @ai-hud/chat-enabled\n# or\npnpm add @ai-hud/chat-enabled\n```\n\nPeer dependencies:\n- **react**: >=17\n- **react-dom**: >=17\n\n### Quick guides\n\n#### Add only the button\n<img src=\"assets/chat_button.png\" width=\"120px\">\n\n```tsx\nimport { ChatEnabled } from '@ai-hud/chat-enabled';\n\nexport default function Example() {\n  return (\n    <ChatEnabled onClick={() => console.log('Open chat')}> \n      <img src=\"/product.png\" alt=\"Product\" />\n    </ChatEnabled>\n  );\n}\n```\n\nThe button appears when the child is hovered (default). Click the button to trigger `onClick` (e.g., open your chat widget).\n\n### Props\n\n- **children**: React node to wrap. The overlay button is positioned relative to this container.\n- **onClick**: Button click handler.\n- **label**: Accessible label for the button. Default: \"Open chat\".\n- **position**: One of \"top-left\" | \"top-right\" | \"bottom-left\" | \"bottom-right\". Default: \"top-right\".\n- **offset**: Number of pixels from the edges. Default: 8.\n- **icon**: Custom React node to render inside the button.\n- **className**: Class for the outer container.\n- **containerStyle**: Inline styles for the outer container.\n- **buttonClassName**: Class for the floating button.\n- **buttonStyle**: Inline styles for the floating button.\n- **buttonSize**: Size of the button in px. Default: 36.\n- **zIndex**: z-index for the button. Default: 10.\n- **disabled**: Disables the button and dims styles.\n- **trigger**: Visibility trigger: \"hover\" | \"focus\" | \"always\" | \"manual\". Default: \"hover\".\n- **open**: When `trigger` is \"manual\", controls visibility.\n- **onOpenChange(open)**: Called when visibility changes (hover/focus modes).\n- **renderButton(props)**: Custom render function for the button. Receives common button props plus `visible` and `ref`.\n\n### Examples\n\nDefault hover behavior:\n```tsx\n<ChatEnabled onClick={() => console.log('chat')}> \n  <div style={{ width: 280, height: 160, background: '#f3f4f6', borderRadius: 12 }} />\n</ChatEnabled>\n```\n\nAlways visible with larger button and custom z-index:\n```tsx\n<ChatEnabled trigger=\"always\" buttonSize={44} zIndex={20} onClick={() => {}}>\n  <div style={{ width: 280, height: 160, background: '#f3f4f6', borderRadius: 12 }} />\n</ChatEnabled>\n```\n\nCustom button rendering:\n```tsx\n<ChatEnabled\n  renderButton={(btn) => (\n    <button {...btn} style={{ ...btn.style, background: '#111827', color: 'white' }}>\n      Chat\n    </button>\n  )}\n  onClick={() => {}}\n>\n  <div style={{ width: 280, height: 160, background: '#f3f4f6', borderRadius: 12 }} />\n</ChatEnabled>\n```\n\nManual control:\n```tsx\nconst [open, setOpen] = useState(false);\n\n<ChatEnabled trigger=\"manual\" open={open} onOpenChange={setOpen} onClick={() => {}}>\n  <div />\n</ChatEnabled>\n```\n\nNote: In JSX you must use `<ChatEnabled />` (PascalCase). A lower-cased alias is exported for named imports, but not for JSX tags.\n\n### Floating window (built-in)\n<img src=\"assets/floating_window.png\" width=\"240px\">\n\n`ChatEnabled` can open a clean floating window on click. Pass `windowContent` for dynamic content and `windowProps` to control size/position.\n\n```tsx\n<ChatEnabled\n  openWindowOnClick\n  windowProps={{ title: 'Chat', position: 'bottom-right', width: 360, height: 480 }}\n  windowContent={\n    <div style={{ padding: 12 }}>\n      {/* your chat UI here */}\n      Hello world\n    </div>\n  }\n>\n  <div style={{ width: 280, height: 160, background: '#f3f4f6', borderRadius: 12 }} />\n</ChatEnabled>\n```\n\n`windowProps` controls the chat window: `title`, `position` (supports `auto`), `width`, `height`, `minWidth`, `minHeight`, `offset`, `zIndex`, `className`, `style`, `headerClassName`, `bodyClassName`, `closeButtonAriaLabel`, `closeOnEscape`, `onClose`, and `draggable` (defaults to `true`). With `position=\"auto\"`, the window positions near the trigger button and stays fully within the viewport.\n\n### Window options (windowProps)\n\n- **title**: Title shown in the window header. Accepts text or a React node.\n- **position**: Where to place the window relative to the trigger.\n  - Values: \"top-left\" | \"top-right\" | \"bottom-left\" | \"bottom-right\" | \"auto\"\n  - \"auto\" tries to place near the trigger and keeps the window fully in the viewport.\n- **width**: Window width in pixels. Default: 360.\n- **height**: Window height in pixels. Default: 480.\n- **minWidth**: Minimum width in pixels. Default: 280.\n- **minHeight**: Minimum height in pixels. Default: 240.\n- **offset**: Pixel gap from screen edges or the trigger when using auto positioning. Default: 16.\n- **zIndex**: Stacking order. Default: 1000.\n- **className**: CSS class for the outer window container.\n- **style**: Inline styles for the outer window container.\n- **headerClassName**: CSS class for the window header.\n- **bodyClassName**: CSS class for the window body/content area.\n- **closeButtonAriaLabel**: Accessible label for the close button. Default: \"Close\".\n- **closeOnEscape**: Close the window when pressing Escape. Default: true.\n- **onClose()**: Callback fired when the window closes.\n- **draggable**: Allow dragging the window by its header. Default: true.\n\n### Default chatbot (opt-in)\n<img src=\"assets/default_chatbot.png\" width=\"240px\">\n\nUse `DefaultChatbot` by passing it via `windowContent`. This is opt-in and not automatic.\n\n```tsx\nimport { ChatEnabled, DefaultChatbot } from '@ai-hud/chat-enabled';\n\n<ChatEnabled\n  openWindowOnClick\n  windowProps={{ title: 'Chat', position: 'bottom-right', width: 360, height: 480 }}\n  windowContent={<DefaultChatbot />}\n>\n  <div style={{ width: 280, height: 160, background: '#f3f4f6', borderRadius: 12 }} />\n</ChatEnabled>\n```\n\n`DefaultChatbot` features:\n- **message history**, **text input**, **multiple image upload previews**\n- calls OpenAI chat completions with a placeholder key (replace with your own)\n - per-conversation persistence via `conversationId`:\n   - pass a custom `conversationId` to persist/reuse a specific thread\n   - omit it to auto-generate a new id for each mount\n\nDefaultChatbot props (commonly used):\n- **conversationId?**: string or null; when omitted, a new id is generated per mount\n- **context?**: any JSON-serializable object; included as a system message for additional grounding/context\n- **contextImages?**: string[] of HTTPS or data: URLs; images are sent with the first user message as vision context. Useful for screenshots/plots. When `sendComponentImageAsContext` is enabled on `windowProps`, the captured image is appended to this list.\n- **systemPrompt?**: system instruction string\n- **welcome?**: first assistant message in a new conversation\n- **model?**: OpenAI model id (default: gpt-4o-mini)\n- **placeholderApiKey?**: optionally pass an API key (for quick demos). In production, prefer a server proxy. You can also set a global `OPENAI_API_KEY` (e.g., `window.OPENAI_API_KEY = 'sk-...'`) or define `OPENAI_API_KEY` in process env during build.\n\nYou can programmatically clear conversations:\n\n```ts\nimport { clearConversation, clearAllConversations } from '@ai-hud/chat-enabled';\n\nclearConversation('example-auto');\nclearAllConversations();\n```\n\nNote: If you omit `conversationId`, an anonymous conversation is created and its history is automatically cleared from localStorage when the window closes.\n\n### Send component image as context\n<img src=\"assets/visual_context_gif.gif\" width=\"360px\">\n\nYou can automatically attach a screenshot of the wrapped child as visual context for the chatbot. Enable this by setting an option on `windowProps`.\n\n```tsx\nimport { ChatEnabled, DefaultChatbot } from '@ai-hud/chat-enabled';\n\n<ChatEnabled\n  openWindowOnClick\n  windowProps={{\n    title: 'Ask about the component',\n    position: 'auto',\n    width: 360,\n    height: 420,\n    sendComponentImageAsContext: true,\n  }}\n  windowContent={\n    <DefaultChatbot\n      conversationId=\"example-red\"\n      welcome=\"Try asking: Which number is in red color?\"\n    />\n  }\n>\n  <div style={{ width: 280, background: '#f3f4f6', borderRadius: 12, padding: 12 }}>\n    <span>\n      24 and <span style={{ color: \"#ef4444\", fontWeight: 600 }}>18</span> are my favorite numbers.\n    </span>\n  </div>\n</ChatEnabled>\n```\n\nHow it works:\n- When the window opens, the child is captured with a lightweight DOM screenshot and injected into the chatbot as `contextImages`.\n- If capture isn’t ready yet, a short placeholder is shown; then the image is attached automatically.\n\nNotes:\n- The capture uses an inline DOM-to-image approach; external images must be CORS-enabled to avoid a tainted canvas.\n- For best OCR, the capture is scaled up to improve legibility.\n- If you already pass `contextImages` to `DefaultChatbot`, the captured image is appended.\n\nYou can also provide `contextImages` directly:\n\n```tsx\n<ChatEnabled openWindowOnClick windowProps={{ title: 'With images', position: 'auto', width: 360, height: 420 }}\n  windowContent={\n    <DefaultChatbot\n      conversationId=\"example-images\"\n      contextImages={[\n        'data:image/png;base64,iVBORw0K...', // or an https URL to a hosted image\n      ]}\n    />\n  }\n>\n  <div style={{ width: 280, height: 160, background: '#f3f4f6', borderRadius: 12 }} />\n</ChatEnabled>\n```\n\n### Tool calling (basic example)\n<img src=\"assets/tools_gif.gif\" width=\"360px\">\n\n`DefaultChatbot` can call developer-defined tools (function calling). Provide a list of tools via the `tools` prop; each tool includes an OpenAI-style JSON schema and an `execute` function that runs in your app.\n\n```tsx\nimport { ChatEnabled, DefaultChatbot } from '@ai-hud/chat-enabled';\n\n<ChatEnabled\n  openWindowOnClick\n  windowProps={{ title: 'Tools: Calculator', position: 'auto', width: 360, height: 420 }}\n  windowContent={\n    <DefaultChatbot\n      conversationId=\"example-tools-calc\"\n      systemPrompt=\"You can use a calculator tool to compute expressions when needed.\"\n      inputPlaceholder=\"Ask: what is (23*7 + 42)/5?\"\n      tools={[\n        {\n          type: 'function',\n          function: {\n            name: 'calculator',\n            description: \"Evaluate a basic arithmetic expression like '2 + 2 * 3'\",\n            parameters: {\n              type: 'object',\n              properties: {\n                expression: { type: 'string', description: 'Math expression to evaluate' },\n              },\n              required: ['expression'],\n            },\n          },\n          async execute(args: any) {\n            const expr = typeof args === 'string' ? args : (args?.expression ?? '');\n            try {\n              const result = Function(`\"use strict\"; return (${expr})`)();\n              return String(result);\n            } catch (e: any) {\n              return `calc error: ${e?.message || String(e)}`;\n            }\n          },\n        },\n      ]}\n    />\n  }\n>\n  <div style={{ width: 280, height: 160, background: '#f3f4f6', borderRadius: 12 }} />\n</ChatEnabled>\n```\n\nNotes:\n- The model chooses when to call tools based on the schema you provide. Return strings (or JSON-serializable data) from `execute`.\n- For production, run tool code on a server when needed; the example above runs in-browser for simplicity.\n\n### Tool calling (multiple tools)\n\nYou can expose multiple tools. The model decides which to call (and in what order) based on your instructions and the tool schemas.\n\n```tsx\nimport { ChatEnabled, DefaultChatbot } from '@ai-hud/chat-enabled';\n\n<ChatEnabled\n  openWindowOnClick\n  windowProps={{ title: 'Tools: Calculator + Jokes', position: 'auto', width: 360, height: 420 }}\n  windowContent={\n    <DefaultChatbot\n      conversationId=\"example-tools-2\"\n      systemPrompt=\"You can use a calculator tool to compute expressions when needed.\"\n      inputPlaceholder=\"Ask: Repeat a joke 1+2 number of times. Use the calculator tool to find the mathematical answer.\"\n      tools={[\n        {\n          type: 'function',\n          function: {\n            name: 'calculator',\n            description: \"Evaluate a basic arithmetic expression like '2 + 2 * 3'\",\n            parameters: {\n              type: 'object',\n              properties: {\n                expression: { type: 'string', description: 'Math expression to evaluate' },\n              },\n              required: ['expression'],\n            },\n          },\n          async execute(args: any) {\n            const expr = typeof args === 'string' ? args : (args?.expression ?? '');\n            try {\n              const result = Function(`\"use strict\"; return (${expr})`)();\n              return String(result);\n            } catch (e: any) {\n              return `calc error: ${e?.message || String(e)}`;\n            }\n          },\n        },\n        {\n          type: 'function',\n          function: {\n            name: 'joke-generator',\n            description: 'Tells a short joke',\n            parameters: { type: 'object', properties: {}, required: [] },\n          },\n          async execute() {\n            return 'Why did the chicken cross the road? To get to the other side.';\n          },\n        },\n      ]}\n    />\n  }\n>\n  <div style={{ width: 280, height: 160, background: '#f3f4f6', borderRadius: 12 }} />\n</ChatEnabled>\n```\n\nTip:\n- Encourage the model via `systemPrompt`/user prompt to compute counts with the calculator tool and then apply the result to how it uses other tools or structures its response.\n\n### Local development\n\nThis repo includes a minimal Vite example for development:\n\n```bash\n# in repo root\nnpm install\nnpm run build\n\n# run the example app\ncd examples/basic\nnpm install\nnpm run dev\n```\n\nThe example uses a path alias to the local `src/` for instant iteration. To test the built package instead, run `npm pack` in the root and install the generated tarball in the example.\n\n### License\n\nEPL-2.0 license\n\n<a href=\"https://buymeacoffee.com/harshalgajjar\" rel=\"nofollow\">\n  <img src=\"https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png\" alt=\"Buy Me A Coffee\" height=\"40\" />\n</a>","readmeFilename":"README.md"}