@appland/appmap 3.118.0 → 3.119.0
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/CHANGELOG.md +7 -0
- package/built/cmds/index/index.js +2 -0
- package/built/cmds/index/index.js.map +1 -1
- package/built/html/appmap.js +5 -3
- package/built/html/appmap.js.map +2 -2
- package/built/html/sequenceDiagram.js +5 -3
- package/built/html/sequenceDiagram.js.map +2 -2
- package/built/rpc/appmap/filter.js.map +1 -1
- package/built/rpc/appmap/stats.js +40 -0
- package/built/rpc/appmap/stats.js.map +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [@appland/appmap-v3.119.0](https://github.com/getappmap/appmap-js/compare/@appland/appmap-v3.118.0...@appland/appmap-v3.119.0) (2024-01-19)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* RPC command appmap.stats ([67e5550](https://github.com/getappmap/appmap-js/commit/67e55508538a3710b89d785ddcd373044bea725e))
|
|
7
|
+
|
|
1
8
|
# [@appland/appmap-v3.118.0](https://github.com/getappmap/appmap-js/compare/@appland/appmap-v3.117.1...@appland/appmap-v3.118.0) (2024-01-16)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -20,6 +20,7 @@ const explain_1 = require("../../rpc/explain/explain");
|
|
|
20
20
|
const rpcServer_1 = __importDefault(require("./rpcServer"));
|
|
21
21
|
const data_1 = __importDefault(require("../../rpc/appmap/data"));
|
|
22
22
|
const client_1 = require("@appland/client");
|
|
23
|
+
const stats_1 = __importDefault(require("../../rpc/appmap/stats"));
|
|
23
24
|
exports.command = 'index';
|
|
24
25
|
exports.describe = 'Compute fingerprints and update index files for all appmaps in a directory';
|
|
25
26
|
const builder = (args) => {
|
|
@@ -68,6 +69,7 @@ const handler = async (argv) => {
|
|
|
68
69
|
const rpcMethods = [
|
|
69
70
|
(0, numProcessed_1.numProcessed)(cmd),
|
|
70
71
|
(0, search_1.search)(appmapDir),
|
|
72
|
+
(0, stats_1.default)(appmapDir),
|
|
71
73
|
(0, filter_1.default)(),
|
|
72
74
|
(0, data_1.default)(),
|
|
73
75
|
(0, metadata_1.default)(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/cmds/index/index.ts"],"names":[],"mappings":";;;;;;AAAA,wDAAgC;AAGhC,gHAAwF;AACxF,wGAAgF;AAChF,6EAA0E;AAC1E,+DAA4D;AAC5D,uCAAsC;AACtC,qCAAoC;AACpC,+DAA4D;AAC5D,oDAAiD;AACjD,qEAAmD;AAEnD,yEAAiD;AACjD,uFAA+D;AAC/D,uDAAiF;AACjF,4DAAoC;AACpC,iEAA+C;AAC/C,4CAAoD;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/cmds/index/index.ts"],"names":[],"mappings":"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"}
|
package/built/html/appmap.js
CHANGED
|
@@ -790,14 +790,16 @@ See exactly how functions, web services, data stores, security, I/O and dependen
|
|
|
790
790
|
${r$e(e,t,r)}
|
|
791
791
|
</div>`;var n$e=new Of(ZH({langPrefix:"hljs language-",highlight(e,t){let r=CI.getLanguage(t)?t:"plaintext";return CI.highlight(e,{language:r}).value}}),{renderer:TS}),i$e=j({render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"message",attrs:{"data-cy":"message","data-actor":e.isUser?"user":"system","data-error":e.isError}},[r("div",{staticClass:"avatar"},[r(e.avatar,{tag:"v-component"})],1),e._v(" "),r("div",{staticClass:"name"},[e._v(e._s(e.name))]),e._v(" "),e.isUser?r("div",{staticClass:"message-body",attrs:{"data-cy":"message-text"}},[e._v(e._s(e.message))]):r("div",{staticClass:"message-body",attrs:{"data-cy":"message-text"},domProps:{innerHTML:e._s(e.renderedMarkdown)}}),e._v(" "),r("div",{staticClass:"buttons"},[!e.isUser&&e.id?r("span",{class:{button:1,sentiment:1,"sentiment--good":1,"sentiment--selected":e.sentiment>0},attrs:{"data-cy":"feedback-good"},on:{click:function(n){return e.setSentiment(1)}}},[r("v-thumb-icon")],1):e._e(),e._v(" "),!e.isUser&&e.id?r("span",{class:{button:1,sentiment:1,"sentiment--bad":1,"sentiment--selected":e.sentiment<0},attrs:{"data-cy":"feedback-bad"},on:{click:function(n){return e.setSentiment(-1)}}},[r("v-thumb-icon")],1):e._e()])])},staticRenderFns:[]},function(e){e&&(e("data-v-6c9da99d_0",{source:".message[data-v-6c9da99d]{display:grid;grid-template-columns:38px 1fr;grid-template-rows:16px 1fr;gap:.5rem 1rem;padding:0 1rem;color:#ececec}.message[data-actor=user] .message-body[data-v-6c9da99d]{white-space:preserve}.message .avatar[data-v-6c9da99d]{width:38px;height:38px;overflow:hidden;grid-column:1;border-radius:50%}.message .avatar svg[data-v-6c9da99d]{overflow:visible}.message .avatar svg rect[data-v-6c9da99d]{fill:rgba(0,0,0,.2)}.message .avatar img[data-v-6c9da99d]{width:100%;height:100%;object-fit:cover}.message .name[data-v-6c9da99d]{font-weight:700;grid-column:2}.message .message-body[data-v-6c9da99d]{grid-column:2;grid-row:2;max-width:100%;overflow:hidden}.message .message-body[data-v-6c9da99d] :last-child{margin-bottom:0}.message:hover .buttons .button[data-v-6c9da99d]{opacity:100%}.message[data-v-6c9da99d]:first-of-type{margin-top:2rem}.message[data-v-6c9da99d]:last-of-type{margin-bottom:2rem}.message:last-of-type .buttons .button[data-v-6c9da99d]{opacity:100%}.message .buttons[data-v-6c9da99d]{grid-column:2;height:1.5rem;margin-bottom:.5rem;user-select:none}.message .buttons .button[data-v-6c9da99d]{opacity:0;transition:opacity .25s ease-in-out}.message .buttons .sentiment[data-v-6c9da99d]{display:inline-block;width:1.5rem;cursor:pointer;padding:1px;transform-origin:center center}.message .buttons .sentiment svg[data-v-6c9da99d]{width:100%;height:100%}.message .buttons .sentiment svg path[data-v-6c9da99d]{stroke:#5d6988;fill:none}.message .buttons .sentiment:hover svg path[data-v-6c9da99d]{stroke:#fff}.message .buttons .sentiment--good[data-v-6c9da99d]:hover{transform:scale(1.1)}.message .buttons .sentiment--bad[data-v-6c9da99d]{transform:rotate(180deg)}.message .buttons .sentiment--bad[data-v-6c9da99d]:hover{transform:rotate(180deg) scale(1.1)}.message .buttons .sentiment--selected[data-v-6c9da99d]{border-radius:.5rem;background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.02);padding:0;opacity:100%!important}.message .buttons .sentiment--selected svg path[data-v-6c9da99d]{stroke:#fff}",map:void 0,media:void 0}),e("data-v-6c9da99d_1",{source:".message .message-body{line-height:1.3rem}.message .message-body hr{border:none;border-top:1px solid rgba(255,255,255,.1);margin:1rem 0}.message .message-body a{color:#0097fa;text-decoration:none}.message .message-body a:hover{color:#2eacff;text-decoration:underline}.message .message-body .md-code-snippet{margin:1rem 0;border-radius:.5rem;background-color:rgba(0,0,0,.1);border:1px solid rgba(255,255,255,.1);overflow:hidden}.message .message-body .md-code-snippet pre{margin:0;border:0;border-radius:0;overflow:auto}.message .message-body .md-code-snippet__header{display:flex;justify-content:space-between;align-items:center;background-color:rgba(0,0,0,.4);border-bottom:1px solid rgba(255,255,255,.1)}.message .message-body .md-code-snippet__language{display:inline-block;padding:.25rem 1rem;border-right:1px solid rgba(255,255,255,.1);color:#e2e4e5}.message .message-body .md-code-snippet__copy{display:inline-block;padding:.25rem 1rem;border-left:1px solid rgba(255,255,255,.1);color:#e2e4e5;cursor:pointer;transition:background-color .5s ease-in-out}.message .message-body .md-code-snippet__copy svg{height:16px;width:16px}.message .message-body .md-code-snippet__copy svg path{fill:#e2e4e5}.message .message-body .md-code-snippet__copy:hover{background-color:rgba(255,255,255,.2)}.message .message-body .md-code-snippet__copy:active{background-color:#4362b1;transition:background-color 0s}.message .message-body code{border-radius:6px;background-color:rgba(0,0,0,.4);border:1px solid rgba(255,255,255,.1);padding:.25em .25rem 0 .25rem;color:#e2e4e5}.message .message-body pre{padding:1rem;border-radius:.5rem;background-color:rgba(0,0,0,.4);border:1px solid rgba(255,255,255,.1)}.message .message-body pre code{border:0;background-color:transparent;padding:0}.message .message-body ul{margin:1rem 0;margin-block-start:1em;margin-block-end:1em}.message .message-body>p:first-child{margin-top:0}.message .message-body>p:last-child{margin-bottom:0}",map:void 0,media:void 0}))},{name:"v-user-message",components:{VNavieCompass:_S,VUserAvatar:Loe,VThumbIcon:t$e,VButton:ai},props:{id:{required:!1},isUser:{default:!1},isError:{default:!1},message:{default:""},sentiment:{default:0}},data:()=>({sentimentTimeout:void 0}),computed:{dynamicMessage(){return this.message.toString()||"..."},avatar(){return this.isUser?Loe:_S},name(){return this.isUser?"You":"Navie"},renderedMarkdown(){let e=n$e.parse(this.dynamicMessage);return koe.default.sanitize(e,{USE_PROFILES:{html:!0}})}},methods:{setSentiment(e){if(this.sentimentTimeout||(this.sentimentTimeout=setTimeout(()=>{this.sentimentTimeout=void 0},250),!this.id))return;let t=this.sentiment===e?0:e;this.$emit("change-sentiment",this.id,t)},bindCopyButtons(){navigator&&navigator.clipboard&&typeof navigator.clipboard.writeText=="function"&&this.$el.querySelectorAll(".md-code-snippet__copy").forEach(e=>{e.addEventListener("click",async()=>{let t=e.closest(".md-code-snippet").querySelector("code");t&&await navigator.clipboard.writeText(t.innerText.replace(/\n/g,`
|
|
792
792
|
`))})})}},updated(){this.bindCopyButtons()}},"data-v-6c9da99d",!1,void 0,!1,Z,void 0,void 0),a$e=j({render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"chat-input"},[r("span",{ref:"input",attrs:{contenteditable:"plaintext-only",placeholder:e.placeholder,role:"textbox",tabindex:"0","data-cy":"chat-input"},on:{input:e.onInput,keydown:e.onKeyDown}}),e._v(" "),r("v-popper",{attrs:{text:"Send message",placement:"top","text-align":"left",disabled:!e.hasInput}},[r("button",{staticClass:"send",attrs:{"data-cy":"send-message",disabled:!e.hasInput},on:{click:e.send}},[r("v-send-icon")],1)])],1)},staticRenderFns:[]},function(e){e&&e("data-v-073d74d3_0",{source:"@keyframes glow-data-v-073d74d3{0%,100%{filter:drop-shadow(0 0 .5rem #4983e0)}50%{filter:drop-shadow(0 0 1rem #7289c5)}}.chat-input[data-v-073d74d3]{position:relative;display:flex;padding:1.5rem;border-top:1px solid #67727e;box-shadow:0 0 1rem 0 #010306;border-radius:.5rem .5rem 0 0}.chat-input span[contenteditable][data-v-073d74d3]{width:100%;border:3px solid #7289c5;padding:.66rem;padding-right:3rem;background-color:#171b25;font-size:1rem;color:#fff;animation:glow-data-v-073d74d3 4s infinite ease-in-out;font-family:inherit;resize:none;max-height:200px;overflow-y:auto;overflow-x:hidden}.chat-input span[contenteditable][data-v-073d74d3]:empty:before{content:attr(placeholder);color:#fff}.chat-input span[contenteditable][data-v-073d74d3]:focus-visible{outline:0!important}.chat-input .popper[data-v-073d74d3]{position:absolute;top:50%;right:1rem;transform:translate(-50%,-50%)}.chat-input .popper__text[data-v-073d74d3]{border:none}.chat-input .popper .send[data-v-073d74d3]{height:2rem;width:2rem;padding:.25rem;border:none;border-radius:.5rem;background-color:#6c81ba;transition:background-color .5s ease-in-out}.chat-input .popper .send svg path[data-v-073d74d3]{fill:#fff}.chat-input .popper .send[data-v-073d74d3]:disabled{pointer-events:none;background-color:rgba(114,137,197,.25)}.chat-input .popper .send:disabled svg path[data-v-073d74d3]{fill:#9aa9d3}.chat-input .popper .send[data-v-073d74d3]:hover{cursor:pointer;background-color:#ff07aa}",map:void 0,media:void 0})},{name:"v-chat-input",components:{VSendIcon:_S,VPopper:Bi},props:{question:{type:String},placeholder:{default:""}},data:()=>({input:""}),computed:{hasInput(){return this.input!==""}},methods:{onInput(e){if(!(e instanceof InputEvent))return;let t=e.target;e.inputType==="deleteContentBackward"&&t.innerText===`
|
|
793
|
-
`&&(t.innerText=""),this.input=t.innerText},onKeyDown(e){e instanceof KeyboardEvent&&(e.key!=="Enter"||e.shiftKey||(e.preventDefault(),this.send()))},send(){this.hasInput&&(this.$emit("send",this.input),this.input="",this.$refs.input.innerText="")},focus(){this.$refs.input.focus()}},updated(){this.focus()},mounted(){this.question&&(this.$refs.input.innerText=this.question,this.input=this.question),this.focus()}},"data-v-073d74d3",!1,void 0,!1,Z,void 0,void 0),o$e=j({render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return e.suggestions.length?r("div",{staticClass:"suggestion-grid"},[r("p",[e._v("Not sure? Here are some useful starting points:")]),e._v(" "),r("div",{staticClass:"grid"},e._l(e.suggestions,function(n,i){return r("v-suggestion-card",{key:i,attrs:{title:n.title,"sub-title":n.subTitle,prompt:n.prompt},on:{suggest:e.onSuggestion}})}),1)]):e._e()},staticRenderFns:[]},function(e){e&&e("data-v-1ff481dc_0",{source:".suggestion-grid[data-v-1ff481dc]{margin:1rem auto;font-size:.8rem;color:#c2c2c2;padding:1rem}.suggestion-grid .grid[data-v-1ff481dc]{display:grid;grid-template-columns:repeat(auto-fill,minmax(18rem,1fr));gap:1rem;font-family:system-ui}",map:void 0,media:void 0})},{name:"v-suggestion-grid",components:{VSuggestionCard:j({render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"suggestion-card",attrs:{"data-cy":"prompt-suggestion"},on:{click:e.onClick}},[r("v-pin",{staticClass:"pin"}),e._v(" "),r("div",{staticClass:"title"},[e._v(e._s(e.title))]),e._v(" "),r("div",{staticClass:"sub-title"},[e._v(e._s(e.subTitle))])],1)},staticRenderFns:[]},function(e){e&&e("data-v-7b484116_0",{source:".suggestion-card[data-v-7b484116]{display:inline-grid;grid-template-columns:32px 1fr;background-color:rgba(0,0,0,.4);padding:1rem;row-gap:.5rem;color:#ececec}.suggestion-card[data-v-7b484116]:hover{cursor:pointer;background-color:rgba(255,255,255,.1)}.suggestion-card:hover *[data-v-7b484116]{color:#fff!important}.suggestion-card .pin[data-v-7b484116]{width:32px;height:32px;margin-bottom:-16px;border-radius:50%;overflow:visible;margin-right:1rem;grid-column:1}.suggestion-card .title[data-v-7b484116]{font-weight:700;grid-column:2;margin-left:1rem}.suggestion-card .sub-title[data-v-7b484116]{grid-column:2;grid-row:2;margin-left:1rem;font-size:.8rem}",map:void 0,media:void 0})},{name:"v-suggestion-card",components:{VPin:{functional:!0,render(e,t){let{_c:r,_v:n,data:i,children:a=[]}=t,{class:o,staticClass:s,style:l,staticStyle:c,attrs:u={},...d}=i;return r("svg",{class:[o,s],style:[l,c],attrs:Object.assign({height:"800",width:"800",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 293.334 293.334"},u),...d},a.concat([r("g",{attrs:{fill:"#ff07aa"}},[r("path",{attrs:{d:"M146.667 0C94.903 0 52.946 41.957 52.946 93.721c0 22.322 7.849 42.789 20.891 58.878 4.204 5.178 11.237 13.331 14.903 18.906 21.109 32.069 48.19 78.643 56.082 116.864 1.354 6.527 2.986 6.641 4.743.212 5.629-20.609 20.228-65.639 50.377-112.757 3.595-5.619 10.884-13.483 15.409-18.379a94.561 94.561 0 0016.154-24.084c5.651-12.086 8.882-25.466 8.882-39.629C240.387 41.962 198.43 0 146.667 0zm0 144.358c-28.892 0-52.313-23.421-52.313-52.313 0-28.887 23.421-52.307 52.313-52.307s52.313 23.421 52.313 52.307c0 28.893-23.421 52.313-52.313 52.313z"}}),r("circle",{attrs:{cx:"146.667",cy:"90.196",r:"21.756"}})])]))}}},props:{title:{required:!0},subTitle:{required:!0},prompt:{required:!0}},methods:{onClick(){this.$emit("suggest",this.prompt)}}},"data-v-7b484116",!1,void 0,!1,Z,void 0,void 0)},props:{suggestions:{type:Array,default:()=>[{title:"Document the architecture of a feature.",subTitle:"Get AppMaps and a detailed text description of the code design.",prompt:"Describe a particular feature or system within your application and I'll describe how it works."},{title:"Identify the usage of personal data.",subTitle:"Enumerate the user's personal data that's being accessed.",prompt:"Describe a feature and ask which user data it accesses. I'll tell you what I find."},{title:"Find the root cause of a performance issue.",subTitle:"Describe the issue and let AppMap help you fix it.",prompt:"Let's get to the bottom of a performance issue. Can you describe what the issue is, or how it's manifesting itself in your application?"},{title:"Look for security issues.",subTitle:"Use AppMap data to surface runtime security flaws.",prompt:"I can help you identify any potential security issues. Do you have a particular concern in mind, or would you like me to make a suggestion?"}]}},methods:{onSuggestion(e){this.$emit("suggest",e)}}},"data-v-1ff481dc",!1,void 0,!1,Z,void 0,void 0),Iw=class{constructor(t){fe(this,"content");fe(this,"messageId");fe(this,"sentiment");fe(this,"isUser",!0);fe(this,"isError",!1);this.content=t}},RS=class{constructor(t){fe(this,"messageId");fe(this,"content","");fe(this,"sentiment");fe(this,"isUser",!1);fe(this,"isError",!1);this.messageId=t}append(t){Ve.set(this,"content",[this.content,t].join(""))}},Ow=class{constructor(t){fe(this,"error");fe(this,"messageId");fe(this,"sentiment");fe(this,"isUser",!1);fe(this,"isError",!0);this.error=t}get content(){return this.error.message}},Tse=j({render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"chat"},[e.isChatting?r("div",{staticClass:"button-panel"},[r("div",{attrs:{id:"header-logo"}},[r("v-app-map-navie-logo"),e._v(" "),r("div",{attrs:{id:"header-navie-logo"}},[e._v("Navie")])],1),e._v(" "),r("v-button",{staticClass:"clear",attrs:{size:"small",kind:"ghost"},nativeOn:{click:function(n){return e.clear.apply(null,arguments)}}},[e._v(
|
|
793
|
+
`&&(t.innerText=""),this.input=t.innerText},onKeyDown(e){e instanceof KeyboardEvent&&(e.key!=="Enter"||e.shiftKey||(e.preventDefault(),this.send()))},send(){this.hasInput&&(this.$emit("send",this.input),this.input="",this.$refs.input.innerText="")},focus(){this.$refs.input.focus()}},updated(){this.focus()},mounted(){this.question&&(this.$refs.input.innerText=this.question,this.input=this.question),this.focus()}},"data-v-073d74d3",!1,void 0,!1,Z,void 0,void 0),o$e=j({render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return e.suggestions.length?r("div",{staticClass:"suggestion-grid"},[r("p",[e._v("Not sure? Here are some useful starting points:")]),e._v(" "),r("div",{staticClass:"grid"},e._l(e.suggestions,function(n,i){return r("v-suggestion-card",{key:i,attrs:{title:n.title,"sub-title":n.subTitle,prompt:n.prompt},on:{suggest:e.onSuggestion}})}),1)]):e._e()},staticRenderFns:[]},function(e){e&&e("data-v-1ff481dc_0",{source:".suggestion-grid[data-v-1ff481dc]{margin:1rem auto;font-size:.8rem;color:#c2c2c2;padding:1rem}.suggestion-grid .grid[data-v-1ff481dc]{display:grid;grid-template-columns:repeat(auto-fill,minmax(18rem,1fr));gap:1rem;font-family:system-ui}",map:void 0,media:void 0})},{name:"v-suggestion-grid",components:{VSuggestionCard:j({render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"suggestion-card",attrs:{"data-cy":"prompt-suggestion"},on:{click:e.onClick}},[r("v-pin",{staticClass:"pin"}),e._v(" "),r("div",{staticClass:"title"},[e._v(e._s(e.title))]),e._v(" "),r("div",{staticClass:"sub-title"},[e._v(e._s(e.subTitle))])],1)},staticRenderFns:[]},function(e){e&&e("data-v-7b484116_0",{source:".suggestion-card[data-v-7b484116]{display:inline-grid;grid-template-columns:32px 1fr;background-color:rgba(0,0,0,.4);padding:1rem;row-gap:.5rem;color:#ececec}.suggestion-card[data-v-7b484116]:hover{cursor:pointer;background-color:rgba(255,255,255,.1)}.suggestion-card:hover *[data-v-7b484116]{color:#fff!important}.suggestion-card .pin[data-v-7b484116]{width:32px;height:32px;margin-bottom:-16px;border-radius:50%;overflow:visible;margin-right:1rem;grid-column:1}.suggestion-card .title[data-v-7b484116]{font-weight:700;grid-column:2;margin-left:1rem}.suggestion-card .sub-title[data-v-7b484116]{grid-column:2;grid-row:2;margin-left:1rem;font-size:.8rem}",map:void 0,media:void 0})},{name:"v-suggestion-card",components:{VPin:{functional:!0,render(e,t){let{_c:r,_v:n,data:i,children:a=[]}=t,{class:o,staticClass:s,style:l,staticStyle:c,attrs:u={},...d}=i;return r("svg",{class:[o,s],style:[l,c],attrs:Object.assign({height:"800",width:"800",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 293.334 293.334"},u),...d},a.concat([r("g",{attrs:{fill:"#ff07aa"}},[r("path",{attrs:{d:"M146.667 0C94.903 0 52.946 41.957 52.946 93.721c0 22.322 7.849 42.789 20.891 58.878 4.204 5.178 11.237 13.331 14.903 18.906 21.109 32.069 48.19 78.643 56.082 116.864 1.354 6.527 2.986 6.641 4.743.212 5.629-20.609 20.228-65.639 50.377-112.757 3.595-5.619 10.884-13.483 15.409-18.379a94.561 94.561 0 0016.154-24.084c5.651-12.086 8.882-25.466 8.882-39.629C240.387 41.962 198.43 0 146.667 0zm0 144.358c-28.892 0-52.313-23.421-52.313-52.313 0-28.887 23.421-52.307 52.313-52.307s52.313 23.421 52.313 52.307c0 28.893-23.421 52.313-52.313 52.313z"}}),r("circle",{attrs:{cx:"146.667",cy:"90.196",r:"21.756"}})])]))}}},props:{title:{required:!0},subTitle:{required:!0},prompt:{required:!0}},methods:{onClick(){this.$emit("suggest",this.prompt)}}},"data-v-7b484116",!1,void 0,!1,Z,void 0,void 0)},props:{suggestions:{type:Array,default:()=>[{title:"Document the architecture of a feature.",subTitle:"Get AppMaps and a detailed text description of the code design.",prompt:"Describe a particular feature or system within your application and I'll describe how it works."},{title:"Identify the usage of personal data.",subTitle:"Enumerate the user's personal data that's being accessed.",prompt:"Describe a feature and ask which user data it accesses. I'll tell you what I find."},{title:"Find the root cause of a performance issue.",subTitle:"Describe the issue and let AppMap help you fix it.",prompt:"Let's get to the bottom of a performance issue. Can you describe what the issue is, or how it's manifesting itself in your application?"},{title:"Look for security issues.",subTitle:"Use AppMap data to surface runtime security flaws.",prompt:"I can help you identify any potential security issues. Do you have a particular concern in mind, or would you like me to make a suggestion?"}]}},methods:{onSuggestion(e){this.$emit("suggest",e)}}},"data-v-1ff481dc",!1,void 0,!1,Z,void 0,void 0),Iw=class{constructor(t){fe(this,"content");fe(this,"messageId");fe(this,"sentiment");fe(this,"isUser",!0);fe(this,"isError",!1);this.content=t}},RS=class{constructor(t){fe(this,"messageId");fe(this,"content","");fe(this,"sentiment");fe(this,"isUser",!1);fe(this,"isError",!1);this.messageId=t}append(t){Ve.set(this,"content",[this.content,t].join(""))}},Ow=class{constructor(t){fe(this,"error");fe(this,"messageId");fe(this,"sentiment");fe(this,"isUser",!1);fe(this,"isError",!0);this.error=t}get content(){return this.error.message}},Tse=j({render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"chat"},[e.isChatting?r("div",{staticClass:"button-panel"},[r("div",{attrs:{id:"header-logo"}},[r("v-app-map-navie-logo"),e._v(" "),r("div",{attrs:{id:"header-navie-logo"}},[e._v("Navie")])],1),e._v(" "),r("v-button",{staticClass:"clear",attrs:{"data-cy":"new-chat-btn",size:"small",kind:"ghost"},nativeOn:{click:function(n){return e.clear.apply(null,arguments)}}},[e._v(`
|
|
794
|
+
New chat
|
|
795
|
+
`)])],1):e._e(),e._v(" "),r("div",{ref:"messages",staticClass:"messages",attrs:{"data-cy":"messages"},on:{scroll:e.manageScroll}},[e._l(e.messages,function(n,i){return r("v-user-message",{key:i,attrs:{message:n.content,"is-user":n.isUser,"is-error":n.isError,id:n.messageId,sentiment:n.sentiment},on:{"change-sentiment":e.onSentimentChange}})}),e._v(" "),e.loading?r("div",{staticClass:"status-container"},[r("div",{staticClass:"spinner-container"},[r("v-spinner",[r("v-loader-icon",{staticClass:"status-icon"})],1)],1),e._v(" "),e.statusLabel?r("div",{staticClass:"status-label",attrs:{"data-cy":"explain-status"}},[e._v(`
|
|
794
796
|
`+e._s(e.statusLabel)+`
|
|
795
797
|
`)]):e._e()]):e._e(),e._v(" "),e.isChatting?e._e():r("v-suggestion-grid",{attrs:{suggestions:e.suggestions},on:{suggest:e.onSuggestion}})],2),e._v(" "),e.authorized?e._e():r("div",{staticClass:"status-unauthorized status-container"},[r("div",{staticClass:"status-label"},[r("p",[e._v("You must be logged in to AppMap to use this feature.")]),e._v(" "),r("p",[r("b",[e._v("VSCode")]),e._v(`
|
|
796
798
|
To login with VSCode, run the command `),r("tt",[e._v("AppMap: Login")]),e._v(`, or click the Sign In link
|
|
797
799
|
from the AppMap panel.
|
|
798
800
|
`)],1),e._v(" "),e._m(0)])]),e._v(" "),r("v-chat-input",{ref:"input",class:e.inputClasses,attrs:{placeholder:e.inputPlaceholder,question:e.question},on:{send:e.onSend}})],1)},staticRenderFns:[function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("p",[r("b",[e._v("JetBrains")]),e._v(`
|
|
799
801
|
To login with JetBrains, click the Sign In link from the AppMap panel.
|
|
800
|
-
`)])}]},function(e){e&&e("data-v-
|
|
802
|
+
`)])}]},function(e){e&&e("data-v-79848ec5_0",{source:"#header-logo[data-v-79848ec5]{margin-right:auto;color:#fff;display:flex;flex-direction:row;align-items:center;font-weight:700;font-size:11px;letter-spacing:1px;text-transform:uppercase}#header-navie-logo[data-v-79848ec5]{padding-top:3px}.chat[data-v-79848ec5]{display:flex;flex-direction:column;justify-content:space-between;height:100vh;padding:0;max-width:58rem;margin:0 auto}.chat[data-v-79848ec5] ::-webkit-scrollbar-thumb{width:2px;background-color:rgba(255,255,255,.2)!important}.chat[data-v-79848ec5] ::-webkit-scrollbar-track{border-radius:0 0 .5rem .5rem;background-color:transparent!important}.chat[data-v-79848ec5] ::-webkit-scrollbar-thumb:active,.chat[data-v-79848ec5] ::-webkit-scrollbar-thumb:hover{background:#fff}.chat .button-panel[data-v-79848ec5]{justify-content:end;display:flex;padding:.25rem .5rem;background-color:rgba(0,0,0,.1);border-bottom:1px solid rgba(0,0,0,.21)}.chat .clear[data-v-79848ec5]{padding:.5rem 1rem}.chat .messages[data-v-79848ec5]{height:100%;overflow:auto;padding-right:1rem}.status-container[data-v-79848ec5]{display:inline-block;position:relative;left:54px;margin:-4px .5em -4px .5em;display:flex;width:18rem}.status-container .spinner-container .spinner[data-v-79848ec5]{height:22px;width:22px}.status-container .status-label[data-v-79848ec5]{margin-left:.5rem;color:#fff}.status-container path[data-v-79848ec5]{fill:#768ecb}.status-container--failure path[data-v-79848ec5]{fill:#fd3055}",map:void 0,media:void 0})},{name:"v-chat",components:{VUserMessage:i$e,VChatInput:a$e,VSuggestionGrid:o$e,VSpinner:Ase,VLoaderIcon:Dw,VAppMapNavieLogo:Ru,VButton:ai},props:{question:{type:String},sendMessage:{type:Function},statusLabel:{type:String},suggestions:{type:Array,required:!1},suggestionSpeaker:{type:String,default:"system",validator:e=>["system","user"].includes(e)}},data(){return{messages:[],threadId:void 0,loading:!1,authorized:!0,autoScrollTop:0,enableScrollLog:!1,scrollLog:e=>this.enableScrollLog?console.log(e):void 0}},computed:{inputPlaceholder:()=>"How can I help?",isChatting(){return this.messages.length>0},inputClasses(){return{chatting:this.isChatting}},userMessageCount(){return this.messages.filter(e=>e.isUser).length}},methods:{addToken(e,t,r){if(t!==this.threadId)return;r||console.warn("messageId is undefined"),t||console.warn("threadId is undefined");let n=this.messages.find(i=>i.messageId&&i.messageId===r);n||(n=new RS(r),this.messages.push(n)),n.append(e),this.scrollToBottom()},setAuthorized(e){this.authorized=e},addUserMessage(e){this.messages.push(new Iw(e)),this.userMessageCount===1&&(this.autoScrollTop=0),this.scrollToBottom()},addErrorMessage(e){this.messages.push(new Ow(e)),this.scrollToBottom()},ask(e){this.onSend(e)},onError(e){e.code===401?this.setAuthorized(!1):this.addErrorMessage(e),this.resetStateVariables()},async onSend(e){this.addUserMessage(e),this.loading=!0,this.sendMessage(e)},onAck(e,t){this.setAuthorized(!0),this.threadId=t},onSuggestion(e){if(this.suggestionSpeaker==="system"){let t=new RS("suggested-message");t.append(e),this.messages.push(t)}else this.ask(e)},onComplete(){this.resetStateVariables()},clear(){this.threadId=void 0,this.messages.splice(0),this.autoScrollTop=0,this.resetStateVariables(),this.$emit("clear")},resetStateVariables(){this.loading=!1},scrollToBottom(){this.$nextTick(()=>{let e=this.autoScrollTop-this.$refs.messages.scrollTop;if(this.autoScrollTop!=0&&e>5)return void this.scrollLog("User scrolled up, disabling auto-scroll");let t=this.$refs.messages.scrollHeight-this.$refs.messages.clientHeight;this.$refs.messages.scrollTop=t,this.autoScrollTop=t,this.scrollLog("Auto-scrolling to bottom")})},async onSentimentChange(e,t){if(!e)return;let r=this.messages.find(n=>n.messageId===e);r&&r.sentiment!==t&&(await ks.AI.sendMessageFeedback(r.messageId,t),r.sentiment=t)},manageScroll(){this.$refs.messages.scrollTop>this.autoScrollTop&&(this.scrollLog("User scrolled down"),this.isFullyScrolled()?(this.scrollLog("Content is fully scrolled, re-enabling auto-scroll"),this.autoScrollTop=this.$refs.messages.scrollTop):this.scrollLog("Content is not fully scrolled"))},isFullyScrolled(){let{messages:e}=this.$refs,t=e.scrollHeight-e.clientHeight;return Math.abs(e.scrollTop-t)<40}}},"data-v-79848ec5",!1,void 0,!1,Z,void 0,void 0),Rse={props:{apiKey:{type:String,required:!1},apiUrl:{type:String,required:!1}},watch:{apiKey:{handler(){this.updateClientConfiguration()},immediate:!0}},methods:{updateClientConfiguration(){(0,ks.setConfiguration)({apiKey:this.apiKey,apiURL:this.apiUrl||ks.DefaultApiURL})}}},s$e=j({render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"chat-container"},[r("v-chat",{ref:"vchat",staticClass:"chat",attrs:{"suggestion-speaker":"user","send-message":e.sendMessage,suggestions:e.suggestions}})],1)},staticRenderFns:[]},function(e){e&&e("data-v-0d4950ff_0",{source:".chat-container[data-v-0d4950ff]{min-width:100%;max-width:100%;min-height:100%;max-height:100%;overflow-y:auto;overflow-x:hidden;background:radial-gradient(circle,#364262 0,rgba(0,0,0,0) 80%);background-color:#242c41;background-repeat:no-repeat,repeat,repeat;background-size:100% 200%}",map:void 0,media:void 0})},{name:"v-chat-page",components:{VChat:Tse},props:{aiClientFn:{type:Function}},mixins:[Rse],data:()=>({suggestions:[{title:"Getting started with AppMap",subTitle:"First time with AppMap? Navie will help you get up and running smoothly.",prompt:"Provide me with step by step instructions for installing the AppMap agent and recording my first AppMap."},{title:"Learn about AppMap",subTitle:"Navie can teach you new ways to streamline your workflow using AppMap",prompt:"What are some useful ways that I can use AppMap to improve my workflow? What are some best practices?"},{title:"Bring AppMap to your team",subTitle:"Learn about different ways to integrate AppMap into your team's workflow.",prompt:"What are some ways that I can integrate AppMap into my teams workflow?"},{title:"Enhance the performance of AppMap",subTitle:"Navie can help you optimize AppMap for better efficiency in large-scale and complex projects.",prompt:"How can I configure `appmap.yml` to speed up instrumentation and exclude noisy or irrelevant data from my recordings?"}]}),computed:{vchat(){return this.$refs.vchat}},methods:{async sendMessage(e){let{vchat:t}=this,r;(await this.aiClient({onAck:(n,i)=>{r=i,t.onAck(n,i)},onToken:(n,i)=>{t.addToken(n,r,i)},onError:t.onError.bind(t),onComplete:t.onComplete.bind(t)})).inputPrompt(e,{threadId:t.threadId})},async aiClient(e){return this.aiClientFn?this.aiClientFn(e):ks.AI.connect(e)}}},"data-v-0d4950ff",!1,void 0,!1,Z,void 0,void 0),l$e=Soe();function IS(e,t,r){if(t)e&&e({message:t.toString()});else if(r)if(r.code)e&&e(r);else{let n=r.message||r.toString();e&&e({message:`An unexpected error occurred: ${n}`})}}var Nw=class extends Boe.EventEmitter{constructor(r){super();fe(this,"client");this.client=r}explain(r,n){return new Promise((i,a)=>{this.client.request("explain",{threadId:n,question:r},(o,s,l)=>{if(o||s)return IS(a,o,s);this.pollForStatus(l.userMessageId),this.onAck(l.userMessageId,l.threadId),i(l.userMessageId)})})}pollForStatus(r,n=500){let i=0,a=setInterval(()=>{this.client.request("explain.status",{userMessageId:r},(o,s,l)=>{if(s&&s.code===404&&clearInterval(a),o||s)return IS(this.onError.bind(this),o,s);this.emit("status",l);let c=l.explanation||[],u=c.length-i;if(u>0){let d=c.slice(-u);for(let p of d)this.onToken(p,r)}i=c.length,["complete","error"].includes(l.step)&&(clearInterval(a),this.onComplete())})},n)}onError(r){this.emit("error",r)}onAck(r,n){this.emit("ack",r,n)}onToken(r,n){this.emit("token",r,n)}onComplete(){this.emit("complete")}},ww=class{constructor(t){fe(this,"client");var r;this.client=typeof t=="number"?(r=t,new l$e(function(n,i){let a={method:"POST",body:n,headers:{"Content-Type":"application/json"}};window.fetch(`http://localhost:${r}`,a).then(function(o){return o.text()}).then(function(o){i(null,o)}).catch(function(o){i(o)})},{})):t}appmapData(t,r){return new Promise((n,i)=>{this.client.request("appmap.data",{appmap:t,filter:r},function(a,o,s){if(a||o)return IS(i,a,o);n(s)})})}appmapMetadata(t){return new Promise((r,n)=>{this.client.request("appmap.metadata",{appmap:t},function(i,a,o){if(i||a)return IS(n,i,a);r(o)})})}explain(){return new Nw(this.client)}},c$e=j({render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"chat-search-container",on:{mousemove:e.makeResizing,mouseup:e.stopResizing,mouseleave:e.stopResizing}},[r("div",{ref:"chatContainer",staticClass:"chat-container",attrs:{"data-cy":"resize-left"}},[r("v-chat",{ref:"vchat",staticClass:"chat-search-chat",attrs:{"send-message":e.sendMessage,"status-label":e.searchStatusLabel,question:e.question},on:{clear:e.clear}})],1),e._v(" "),r("div",{staticClass:"chat-search-container--drag",attrs:{"data-cy":"resize-handle"},on:{mousedown:e.startResizing}}),e._v(" "),r("div",{staticClass:"search-container"},[r("div",{staticClass:"search-results-container"},[r("div",{staticClass:"search-results-header"},[r("div",[r("h2",[e._v("AppMap search results")]),e._v(" "),e.searchResponse?r("div",[r("div",{staticClass:"search-results-subheader"},[e._v(`
|
|
801
803
|
Showing top `+e._s(e.searchResponse.results.length)+` of
|
|
802
804
|
`+e._s(e.searchResponse.numResults)+`
|
|
803
805
|
`)])]):r("div",{staticClass:"search-results-subheader"},[e.searching?r("p",[e._v("Searching...")]):r("p",[e._v("Start a conversation to find and explore AppMaps")])])]),e._v(" "),e.searchResponse?r("div",{staticClass:"search-results-list-container"},[e.selectedSearchResultId?r("select",{directives:[{name:"model",rawName:"v-model",value:e.selectedSearchResultId,expression:"selectedSearchResultId"}],staticClass:"search-results-list",attrs:{"data-cy":"appmap-list"},on:{change:function(n){var i=Array.prototype.filter.call(n.target.options,function(a){return a.selected}).map(function(a){return"_value"in a?a._value:a.value});e.selectedSearchResultId=n.target.multiple?i:i[0]}}},e._l(e.searchResponse.results,function(n){return r("option",{key:n.id,domProps:{value:n.id}},[e._v(`
|
|
@@ -814,7 +816,7 @@ See exactly how functions, web services, data stores, security, I/O and dependen
|
|
|
814
816
|
Prompt:
|
|
815
817
|
`),r("ul",{staticClass:"prompt"},e._l(e.searchStatus.prompt,function(n){return r("li",{key:[n.role,n.content].join("->")},[r("code",{staticClass:"role"},[e._v(e._s(n.role))]),e._v(" "),r("div",{staticClass:"content"},[e._v(`
|
|
816
818
|
`+e._s(n.content)+`
|
|
817
|
-
`)])])}),0)]):e._e()]):e._e()]):e._e()],1)])},staticRenderFns:[]},function(e){e&&e("data-v-
|
|
819
|
+
`)])])}),0)]):e._e()]):e._e()]):e._e()],1)])},staticRenderFns:[]},function(e){e&&e("data-v-3e8887e1_0",{source:".chat-search-container[data-v-3e8887e1]{display:flex;flex-direction:row;min-width:100%;max-width:100%;min-height:100vh;max-height:100vh;overflow-y:auto;background-color:#242c41}.chat-search-container .chat-container[data-v-3e8887e1]{overflow:hidden;width:40%;min-width:375px;background:radial-gradient(circle,#364262 0,rgba(0,0,0,0) 80%);background-repeat:no-repeat,repeat,repeat;background-size:100% 200%}.chat-search-container .chat-container .chat-search-chat[data-v-3e8887e1]{min-width:auto;margin:0;max-width:none!important}.chat-search-container .chat-search-container--drag[data-v-3e8887e1]{width:4px;background:rgba(0,0,0,.1);cursor:col-resize;z-index:100}.chat-search-container .chat-search-container--drag[data-v-3e8887e1]:hover{background:rgba(255,255,255,.1)}.chat-search-container .search-container[data-v-3e8887e1]{font-size:1rem;color:#e3e5e8;flex:2;display:flex;flex-direction:column;overflow-y:auto;background-color:#010306}.chat-search-container .search-container h2[data-v-3e8887e1]{font-size:1.2rem;margin-bottom:.4rem}.chat-search-container .search-container .search-results-header[data-v-3e8887e1]{padding:0 1rem;display:grid;grid-template-columns:1fr auto;margin-bottom:1rem}.chat-search-container .search-container .search-results-subheader[data-v-3e8887e1]{font-size:.8rem;color:#808b98}.chat-search-container .search-container .search-results-list-container[data-v-3e8887e1]{display:flex;flex-direction:column;justify-content:end}.chat-search-container .search-container .search-results-list-container .search-results-list[data-v-3e8887e1]{margin:.5rem 0;width:30em;color:#fff;background-color:#3f4350;border-radius:10px;padding:.3rem;border:none}.chat-search-container .search-container .search-results-list-container .search-results-list[data-v-3e8887e1]:hover{background-color:#4a4f5f;transition:all .2s ease-in-out}.chat-search-container .search-container .search-results-list-container .search-results-list[data-v-3e8887e1]:focus-visible{outline:0}.chat-search-container .search-container .appmap[data-v-3e8887e1]{overflow-y:auto}.chat-search-container .search-container .appmap-empty[data-v-3e8887e1]{height:100%;background-color:#010306;margin-top:0}.diagnostics[data-v-3e8887e1]{background-color:#010306;padding:.5rem;margin-left:-1rem;border-top:1px solid rgba(255,255,255,.1)}.diagnostics a[data-v-3e8887e1]{color:#3794ff;text-decoration:none}.diagnostics ul[data-v-3e8887e1]{list-style:none;margin:0;padding:0;color:#eaeaea}",map:void 0,media:void 0})},{name:"v-chat-search",components:{VChat:Tse,VAppMap:NS,VAccordion:gse},mixins:[Rse],props:{question:{type:String},appmapRpcPort:{type:Number},appmapRpcFn:{type:Function},savedFilters:{type:Array,default:()=>[]},enableDiagnostics:{type:Boolean,default:!1}},data:()=>({searchResponse:void 0,searching:!1,searchStatus:void 0,searchId:0,selectedSearchResultId:void 0,showDiagnostics:!1,isPanelResizing:!1,initialPanelWidth:0,initialClientX:0,searchStatusLabel:void 0,searchStatusLabels:{"build-vector-terms":"Optimizing search terms","search-appmaps":"Searching AppMaps","collect-context":"Collecting context","expand-context":"Expanding context","build-prompt":"Building prompt",explain:"Explaining with AI"},ask:void 0}),watch:{searchResponse:async function(e){if(!e)return void(this.selectedSearchResultId=void 0);let t=e,r=this.rpcClient(),n=0;for(let i of t.results){let a=await r.appmapMetadata(i.appmap);i.id=["search-result",this.searchId,n].join("_"),i.metadata=a,n+=1}t.results.length>0&&(this.selectedSearchResultId=t.results[0].id)},selectedSearchResultId:async function(e){this.$nextTick((async()=>{if(!this.$refs.vappmap)return;if(!e)return void this.$refs.vappmap.resetDiagram();let t=this.rpcClient(),r=this.selectedSearchResult,n=await t.appmapData(r.appmap);await this.$refs.vappmap.loadData(n),this.$refs.vappmap.setState(JSON.stringify({selectedObjects:r.events.map(i=>i.fqid)}))}).bind(this))},statusStep:function(e){if(e){if(e)if(this.searchStatus?.step){let t=this.searchStatusLabels[this.searchStatus.step];t&&(this.searchStatusLabel=[t,"..."].join(""))}else this.searchStatusLabel=void 0}else this.searchStatusLabel=void 0}},computed:{statusStep(){return this.searchStatus?this.searchStatus.step:void 0},selectedSearchResult(){if(this.searchResponse&&this.selectedSearchResultId)return this.searchResponse.results.find(e=>e.id===this.selectedSearchResultId)}},methods:{getAppMapState(){return this.$refs.vappmap?.getState()},setAppMapState(e){this.$refs.vappmap?.setState(e)},updateFilters(e){this.$store.commit(SET_SAVED_FILTERS,e)},async sendMessage(e){let t=this.rpcClient(),r;return this.ask=t.explain(),this.searching=!0,this.lastStatusLabel=void 0,new Promise((n,i)=>{let a=()=>{this.searching=!1,this.$refs.vchat.onComplete(),n()},o=s=>{a(),this.$refs.vchat.onError(s),i()};this.ask.on("ack",(s,l)=>{r=l,this.$refs.vchat.onAck(s,l)}),this.ask.on("token",(s,l)=>{this.$refs.vchat.addToken(s,r,l)}),this.ask.on("error",o),this.ask.on("status",s=>{this.searchStatus=s,!this.searchResponse&&s.searchResponse&&(this.searchResponse=s.searchResponse)}),this.ask.on("complete",a),this.ask.explain(e,this.$refs.vchat.threadId).catch(o)})},clear(){this.searchResponse=void 0,this.searchStatus=void 0,this.selectedSearchResultId=void 0,this.searchId=0,this.searchStatusLabel=void 0,this.ask?.removeAllListeners(),this.searching=!1},toggleDiagonstics(){this.showDiagnostics=!this.showDiagnostics},rpcClient(){return new ww(this.appmapRpcFn?{request:this.appmapRpcFn}:this.appmapRpcPort||30101)},startResizing(e){document.body.style.userSelect="none",this.isPanelResizing=!0,this.initialPanelWidth=this.$refs.chatContainer.offsetWidth,this.initialClientX=e.clientX},makeResizing(e){if(this.isPanelResizing){let r=.75*window.innerWidth,n=this.initialPanelWidth+(e.clientX-this.initialClientX);n=Math.max(280,n),n=Math.min(r,n),this.$refs.chatContainer.style.width=`${n}px`}},stopResizing(){document.body.style.userSelect="",this.isPanelResizing=!1}}},"data-v-3e8887e1",!1,void 0,!1,Z,void 0,void 0),u$e={__proto__:null,VButton:ai,VDetailsPanel:tse,VTabs:rse,VVsCodeExtension:NS,VDiff:PXe,VInstallGuide:JXe,VAnalysisFindings:ZXe,VFindingDetails:XXe,VOpenAppmaps:Cse,VSidebarSignIn:$Xe,VSequenceDiagram:e$e,VChat:s$e,VChatSearch:c$e},xw=function(e){xw.installed||(xw.installed=!0,Object.entries(u$e).forEach(([t,r])=>{e.component(t,r)}))},Ise={install:xw},d$e={__proto__:null,default:j({render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[e.areChildrenVisible?r("v-flamegraph-branch",{attrs:{events:e.children,factor:e.childrenFactor,focus:e.focus,"base-budget":e.baseBudget,"zoom-budget":e.childrenZoomBudget},on:{select:e.propagateSelect,hover:e.propagateHover}}):e._e(),e._v(" "),r("v-flamegraph-item",{attrs:{event:e.event,classes:e.classes,"item-style":e.style,content:e.content},on:{select:e.propagateSelect,hover:e.propagateHover,mousedown:e.mousedown,mouseup:e.mouseup}})],1)},staticRenderFns:[]},void 0,{name:"v-flamegraph-node",emits:["select","hover"],components:{VFlamegraphBranch:dse,VFlamegraphItem:j({render:function(e,t){return(0,t._c)("div",{class:t.props.classes,style:t.props.itemStyle,on:{mousedown:function(){return t.listeners.mousedown()},mouseup:function(){return t.listeners.mouseup()},mouseenter:function(){return t.listeners.hover({type:"enter",target:t.props.event})},mouseleave:function(){return t.listeners.hover({type:"leave",target:t.props.event})}}},[t._v(`
|
|
818
820
|
`+t._s(t.props.content)+`
|
|
819
821
|
`)])},staticRenderFns:[]},function(e){e&&e("data-v-bfc51c6a_0",{source:'.flamegraph-item-normal[data-v-bfc51c6a],.flamegraph-item-text[data-v-bfc51c6a]{user-select:none;font-size:12px;line-height:1;border-style:solid;box-sizing:border-box;text-align:left;font-family:"IBM Plex Mono",monospace;box-sizing:border-box;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#d3d3d3}.flamegraph-item-branch[data-v-bfc51c6a],.flamegraph-item-clickable[data-v-bfc51c6a],.flamegraph-item-trunk[data-v-bfc51c6a]{cursor:pointer}.flamegraph-item-branch[data-v-bfc51c6a]:hover,.flamegraph-item-clickable[data-v-bfc51c6a]:hover,.flamegraph-item-trunk[data-v-bfc51c6a]:hover{color:#fff}.flamegraph-item-clickable.flamegraph-item-external-route[data-v-bfc51c6a],.flamegraph-item-external-route.flamegraph-item-branch[data-v-bfc51c6a],.flamegraph-item-external-route.flamegraph-item-trunk[data-v-bfc51c6a]{cursor:pointer}.flamegraph-item-clickable.flamegraph-item-external-route[data-v-bfc51c6a]:hover,.flamegraph-item-external-route.flamegraph-item-branch[data-v-bfc51c6a]:hover,.flamegraph-item-external-route.flamegraph-item-trunk[data-v-bfc51c6a]:hover{color:#808b98}.flamegraph-item-borderless[data-v-bfc51c6a]{box-sizing:border-box;height:34px;border-width:0}.flamegraph-item-textless[data-v-bfc51c6a]{box-sizing:border-box;height:34px;border-style:solid;border-width:1px}.flamegraph-item-normal[data-v-bfc51c6a]{box-sizing:border-box;height:34px;border-style:solid;border-width:1px;padding:10px}.flamegraph-item-query[data-v-bfc51c6a]{background-color:#9c2fba;border-color:#7a2591}.flamegraph-item-external-route[data-v-bfc51c6a]{color:#000;background-color:#ebdf90;border-color:#e3d365}.flamegraph-item-route[data-v-bfc51c6a]{background-color:#542168;border-color:#351541}.flamegraph-item-default[data-v-bfc51c6a],.flamegraph-item-function[data-v-bfc51c6a]{background-color:#4362b1;border-color:#354e8c}.flamegraph-item-sql.flamegraph-item-borderless[data-v-bfc51c6a]{background-color:#7a2591}.flamegraph-item-http.flamegraph-item-borderless[data-v-bfc51c6a]{background-color:#351541}.flamegraph-item-default.flamegraph-item-borderless[data-v-bfc51c6a]{background-color:#354e8c}.flamegraph-item-crown[data-v-bfc51c6a]{position:sticky;left:0;border-color:#ff07aa}.flamegraph-item-trunk[data-v-bfc51c6a]{position:sticky;left:0;opacity:.5}.highlighted[data-v-bfc51c6a]{border-color:#fff}',map:void 0,media:void 0})},{name:"v-flamegraph-item",emits:["mousedown","mouseup","hover"],props:{event:{type:Object,required:!0},classes:{type:Array,default:()=>["flamegraph-item"]},itemStyle:{type:Object,default:()=>({})},content:{type:String,default:""}}},"data-v-bfc51c6a",!0,void 0,!1,Z,void 0,void 0)},props:{event:{type:Object,required:!0},factor:{type:Number,required:!0},focus:{type:Object,default:null},baseBudget:{type:Number,required:!0},zoomBudget:{type:Number,required:!0}},data:()=>({timer:0}),computed:{eventType(){return this.event.codeObject&&this.event.codeObject.data&&this.event.codeObject.type||"default"},classes(){let e=["flamegraph-item",`flamegraph-item-${this.eventType}`,`flamegraph-item-${this.status}`,`flamegraph-item-${this.dimension}`];return this.isHighlighted&&e.push("highlighted"),e},isHighlighted(){return this.$store.state.highlightedEvents.some(e=>e.id===this.event.id)},style(){return{width:`${this.width}px`}},content(){if(this.dimension==="normal"){let e=yu(this.event);return e>0?`[${AXe(e,3)}] ${this.event.toString()}`:this.event.toString()}return""},width(){return this.status==="pruned"?0:this.status==="branch"?this.factor*this.zoomBudget:this.baseBudget},dimension(){return this.width<2?"borderless":this.width<50?"textless":"normal"},ancestors(){return new Set(this.event.ancestors())},childrenZoomBudget(){return this.status==="crown"?this.zoomBudget/this.factor:this.zoomBudget},status(){return this.focus===null?"branch":this.event===this.focus.target?"crown":this.focus.ancestors.has(this.event)?"trunk":this.ancestors.has(this.focus.target)?"branch":"pruned"},children(){return this.event.children},areChildrenVisible(){return this.event.children.length>0},childrenFactor(){return zm(this.event)?this.factor*Math.min(1,this.children.map(yu).reduce(use,0)/yu(this.event)):this.factor}},methods:{propagateSelect(e){this.$emit("select",e)},propagateHover(e){this.$emit("hover",e)},mousedown(){this.timer=Date.now()},mouseup(){new Date-this.timer<200&&this.propagateSelect(this.event)}}},void 0,!1,void 0,!1,void 0,void 0,void 0)};Ve.use(ud);Ve.use(Ise);async function p$e(){return new Ve({el:"#app",render:e=>e(NS,{ref:"ui",props:{appMapUploadable:!0,flamegraphEnabled:!1}}),async mounted(){let t=new URL(document.location).searchParams.get("appmap"),r=await fetch(t),{ui:n}=this.$refs;n.loadData(await r.json()||{})}})}p$e();})();
|
|
820
822
|
/*! Bundled license information:
|