mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-05 02:27:21 +00:00
Highlighted code blocks inside the app (#1153)
This commit is contained in:
1 parent
0b42c0288e
commit
f4a86c2fb8
60 files changed
+2550
-41
No files matched your search
@@ -6,6 +6,7 @@
|
||||
- Improved how reliably AI Studio reads and stores your settings, chats, and backups.
|
||||
- Improved how reliably AI Studio exchanges data with AI providers, external data sources, and web search services.
|
||||
- Improved how reliably the Visual Briefing assistant stores your briefings, and how reliably the assistants of AI Studio read the answers of AI models.
|
||||
- Improved how AI Studio colors code blocks: it now highlights them itself instead of through an extra script, which makes the app smaller. This works for Python, JavaScript, TypeScript, Java, C, C++, C#, Go, Kotlin, Rust, SQL, shell scripts, PowerShell, Lua, CSS, HTML, XML, JSON, and YAML; code in other languages, such as Ruby or PHP, appears without colors. When a code block names no language, AI Studio recognizes it from the code, colors the block, and suggests the matching file extension when you save it.
|
||||
- Changed the size of AI Studio on laptop screens: it now appears in the same size on every laptop, whatever the scaling of your operating system. If you prefer the previous size, choose "System scaling" for the interface size in the app settings. Contributed by Paul Koudelka.
|
||||
- Fixed AI Studio becoming unusable when an update failed after its download. The app now restarts with the version you have installed, so you can simply try the update again.
|
||||
- Fixed configuration plugins you installed yourself being able to change the tool settings of your organization, such as the minimum provider confidence of a tool. These settings now follow the same rules as all other settings, which also gives you back your own values once your organization removes its configuration.
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
.mud-markdown-body code:not(.hljs){background:var(--mud-palette-action-disabled-background);color:var(--mud-palette-text-primary)!important;padding:2.5px 7.5px;border-radius:5px}pre code.hljs{display:block!important;overflow-x:auto;padding:1em;width:100%}.mud-markdown-body .mud-markdown-code-highlight{position:relative!important}.mud-markdown-body .mud-markdown-code-highlight:hover>.mud-markdown-code-highlight-copybtn{display:block!important}.mud-markdown-code-highlight-copybtn{position:absolute;display:none;top:0;right:0}.mud-markdown-code-highlight-sticky pre code.hljs{padding-top:0!important}.mud-markdown-body .mud-markdown-code-highlight-sticky .mud-markdown-code-highlight-copybtn-sticky{position:sticky;overflow:hidden;z-index:calc(var(--mud-zindex-appbar) - 2);top:calc(var(--mud-appbar-height) + 16px);float:right}.mud-markdown-body blockquote{border-left:.25em solid var(--mud-palette-text-disabled);color:var(--mud-palette-text-secondary);background-color:var(--mud-palette-table-hover);padding:.25em 1em;margin:.5em 0 1.25em}.mud-markdown-body blockquote p{margin-bottom:0!important}.mud-markdown-body .mud-table{margin:0 0 1.25em 0}.mud-markdown-body table p{margin-bottom:0!important}.mud-markdown-body .mud-link:hover{cursor:pointer!important}.mud-markdown-body ul{list-style-type:disc}.mud-markdown-body ol,.mud-markdown-body ul{padding-left:2em;margin-bottom:1.25em!important}.mud-markdown-body ul ul{list-style-type:circle;margin-bottom:0!important}.mud-markdown-body ul ul ul{list-style-type:square;margin-bottom:0!important}.mud-markdown-body li{display:list-item!important;text-align:-webkit-match-parent}.mud-markdown-body h1,.mud-markdown-body h2{border-bottom:1px solid var(--mud-palette-text-disabled);padding-bottom:.125em;margin-bottom:.4em}.mud-markdown-body h1,.mud-markdown-body h2,.mud-markdown-body h3,.mud-markdown-body h4,.mud-markdown-body h5,.mud-markdown-body h6{scroll-margin-top:5rem;margin-top:.25em;word-wrap:break-word;margin-bottom:.3em!important}.mud-markdown-body .mud-divider{margin:.5em 0;height:.25em}.mud-markdown-body p{margin-bottom:1.25em!important}.mud-markdown-body .mud-expand-panel p,.mud-markdown-body li p{margin-bottom:0!important}.mud-markdown-body p .mud-markdown-error{white-space:pre}.mud-markdown-body img{max-width:100%}.mud-markdown-toc{position:relative}.mud-markdown-toc-drawer{position:sticky;overflow:hidden;z-index:calc(var(--mud-zindex-appbar) - 2);top:calc(var(--mud-appbar-height) + 16px);float:right}.mud-markdown-toc-drawer-content{width:var(--mud-drawer-width-right);opacity:0;visibility:collapse;transition:opacity .3s ease,visibility .3s ease}.mud-markdown-toc-drawer-content.open{opacity:1;visibility:visible}.mud-markdown-toc-content{margin-right:0;transition:margin-left .3s ease}.mud-markdown-toc-content.open{margin-right:calc(var(--mud-drawer-width-right) + 16px)}.mud-markdown-toc-btn-toggle{position:absolute;right:0;z-index:calc(var(--mud-zindex-appbar) - 1)}.mud-markdown-toc-nav-menu .mud-nav-link{padding:4px 16px!important}.mud-markdown-toc-nav-menu .mud-nav-link-h2 .mud-nav-link-text{margin-left:20px!important}.mud-markdown-toc-nav-menu .mud-nav-link-h3 .mud-nav-link-text{margin-left:28px!important}.mud-markdown-toc-nav-menu .mud-nav-item{border-left:4px solid var(--mud-palette-text-disabled)}.mud-markdown-toc-nav-menu .mud-nav-item.active{border-left-color:var(--mud-palette-primary)!important;color:var(--mud-palette-primary)!important}.mud-markdown-body .mud-expand-panel-header{padding:16px 12px!important}.mud-markdown-body .mud-expand-panel-content{padding:0 12px 16px 12px!important}
|
||||
.hljs{color:var(--mud-markdown-codehightlight-text);background:var(--mud-markdown-codehightlight-background)}.hljs-subst{color:var(--mud-markdown-codehightlight-text)}.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-name,.hljs-template-tag,.hljs-template-variable,.hljs-variable.language_{color:var(--mud-markdown-codehightlight-keyword)}.hljs-type{color:var(--mud-markdown-codehightlight-type)}.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-title.function_{color:var(--mud-markdown-codehightlight-function)}.hljs-attr,.hljs-attribute,.hljs-literal,.hljs-number,.hljs-operator,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id,.hljs-symbol,.hljs-variable{color:var(--mud-markdown-codehightlight-number)}.hljs-string{color:var(--mud-markdown-codehightlight-string)}.hljs-code,.hljs-comment,.hljs-formula{color:var(--mud-markdown-codehightlight-comment)}.hljs-meta{color:var(--mud-markdown-codehightlight-meta)}.mud-markdown-body code:not(.hljs){background:var(--mud-palette-action-disabled-background);color:var(--mud-palette-text-primary)!important;padding:2.5px 7.5px;border-radius:5px}pre code.hljs{display:block!important;overflow-x:auto;padding:1em;width:100%}.mud-markdown-body .mud-markdown-code-highlight,.mud-markdown-body .mud-markdown-code-highlight-sticky{border:1px solid var(--mud-palette-lines-default);border-radius:var(--mud-default-borderradius)}.mud-markdown-body .mud-markdown-code-highlight{position:relative!important}.mud-markdown-body .mud-markdown-code-highlight:hover>.mud-markdown-code-highlight-copybtn{display:block!important}.mud-markdown-code-highlight-copybtn{position:absolute;display:none;top:0;right:0}.mud-markdown-body .mud-markdown-code-highlight-sticky{position:relative;display:flex;flex-direction:column}.mud-markdown-body .mud-markdown-code-highlight-sticky .mud-markdown-code-highlight-copybtn-sticky{position:sticky;align-self:flex-end;z-index:calc(var(--mud-zindex-appbar) - 2);top:calc(var(--mud-appbar-height) + 16px);margin-bottom:-3.5rem}.mud-markdown-body blockquote{border-left:.25em solid var(--mud-palette-text-disabled);color:var(--mud-palette-text-secondary);background-color:var(--mud-palette-table-hover);padding:.25em 1em;margin:.5em 0 1.25em}.mud-markdown-body blockquote p{margin-bottom:0!important}.mud-markdown-body .mud-table{margin:0 0 1.25em 0}.mud-markdown-body table p{margin-bottom:0!important}.mud-markdown-body .mud-link:hover{cursor:pointer!important}.mud-markdown-body ul{list-style-type:disc}.mud-markdown-body ol,.mud-markdown-body ul{padding-left:2em;margin-bottom:1.25em!important}.mud-markdown-body ul ul{list-style-type:circle;margin-bottom:0!important}.mud-markdown-body ul ul ul{list-style-type:square;margin-bottom:0!important}.mud-markdown-body li{display:list-item!important;text-align:-webkit-match-parent}.mud-markdown-body h1,.mud-markdown-body h2{border-bottom:1px solid var(--mud-palette-text-disabled);padding-bottom:.125em;margin-bottom:.4em}.mud-markdown-body h1,.mud-markdown-body h2,.mud-markdown-body h3,.mud-markdown-body h4,.mud-markdown-body h5,.mud-markdown-body h6{scroll-margin-top:5rem;margin-top:.25em;word-wrap:break-word;margin-bottom:.3em!important}.mud-markdown-body .mud-divider{margin:.5em 0;height:.25em}.mud-markdown-body p{margin-bottom:1.25em!important}.mud-markdown-body .mud-expand-panel p,.mud-markdown-body li p{margin-bottom:0!important}.mud-markdown-body p .mud-markdown-error{white-space:pre}.mud-markdown-body img{max-width:100%}.mud-markdown-toc{position:relative}.mud-markdown-toc-drawer{position:sticky;overflow:visible;z-index:calc(var(--mud-zindex-appbar) - 2);top:calc(var(--mud-appbar-height) + 16px);float:right}.mud-markdown-toc-drawer-content{width:0;overflow:hidden;opacity:0;visibility:collapse;transition:opacity .3s ease,visibility .3s ease}.mud-markdown-toc-drawer-content.open{width:var(--mud-drawer-width-right);opacity:1;visibility:visible}.mud-markdown-toc-content{margin-right:0;transition:margin-left .3s ease}.mud-markdown-toc-content.open{margin-right:calc(var(--mud-drawer-width-right) + 16px)}.mud-markdown-toc-btn-toggle{position:absolute;right:0;z-index:calc(var(--mud-zindex-appbar) - 1)}.mud-markdown-toc-nav-menu .mud-nav-link{padding:4px 16px!important}.mud-markdown-toc-nav-menu .mud-nav-link-h2 .mud-nav-link-text{margin-left:20px!important}.mud-markdown-toc-nav-menu .mud-nav-link-h3 .mud-nav-link-text{margin-left:28px!important}.mud-markdown-toc-nav-menu .mud-nav-item{border-left:4px solid var(--mud-palette-text-disabled)}.mud-markdown-toc-nav-menu .mud-nav-item.active{border-left-color:var(--mud-palette-primary)!important;color:var(--mud-palette-primary)!important}.mud-markdown-body .mud-expand-panel-header{padding:16px 12px!important}.mud-markdown-body .mud-expand-panel-content{padding:0 12px 16px 12px!important}
|
||||
+1
-1
@@ -1 +1 @@
|
||||
(()=>{var e={2224:e=>{e.exports=function(e){var t="built_in",a={},n={begin:"}",className:t,endsParent:!0},r={begin:"{",end:"}",contains:[e.QUOTE_STRING_MODE,"self"]},i=e.COMMENT("@\\*","\\*@",{relevance:10}),o={begin:"@[A-Za-z0-9\\._:-]+",returnBegin:!0,end:"(\\r|\\n|<|\\s|\"|')",subLanguage:"csharp",contains:[{begin:"@",className:t},{begin:"\\[",end:"\\]",skip:!0},{begin:"\\(",end:"\\)",skip:!0}],returnEnd:!0},s={begin:"[@]{0,1}<text>",returnBegin:!0,end:"</text>",returnEnd:!0,subLanguage:"cshtml-razor",contains:[{begin:"[@]{0,1}<text>",className:t},{begin:"</text>",className:t,endsParent:!0}]},l={begin:"@\\(",end:"\\)",returnBegin:!0,returnEnd:!0,subLanguage:"csharp",contains:[{begin:"@\\(",className:t},{begin:"\\(",end:"\\)",subLanguage:"csharp",contains:[e.QUOTE_STRING_MODE,"self",s]},s,{begin:"\\)",className:t,endsParent:!0}]},c=function(e,t){var a={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:"[A-Za-z0-9\\._:-]+",relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",variants:[{begin:/"/,end:/"/,contains:t},{begin:/'/,end:/'/,contains:t},{begin:/[^\s"'=<>`]+/}]}]}]};return[{className:"meta",begin:"<!DOCTYPE",end:">",relevance:10,contains:[{begin:"\\[",end:"\\]"}]},e.COMMENT("\x3c!--","--\x3e",{relevance:10}),{begin:"<\\!\\[CDATA\\[",end:"\\]\\]>",relevance:10},{className:"meta",begin:/<\?xml/,end:/\?>/,relevance:10},{className:"tag",begin:"<style(?=\\s|>|$)",end:">",keywords:{name:"style"},contains:[a],starts:{end:"</style>",returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:"<script(?=\\s|>|$)",end:">",keywords:{name:"script"},contains:[a],starts:{end:"<\/script>",returnEnd:!0,subLanguage:["actionscript","javascript","handlebars","xml"]}},{className:"tag",begin:"</?",end:"/?>",contains:[{className:"name",begin:/[^\/><\s]+/,relevance:0},a]}].concat(t)}(e,[o,l]),_="^\\s*@(page|model|using|inherits|inject|layout)",d={begin:_+"[^\\r\\n{\\(]*$",end:"$",returnBegin:!0,returnEnd:!0,contains:[{begin:_,className:t},{variants:[{begin:"\\r|\\n",endsParent:!0},{begin:"\\s[^\\r\\n]+",end:"$"},{begin:"$"}],className:"type",endsParent:!0}]},m={variants:[{begin:"@\\{",end:"}"},{begin:"@code\\s*\\{",end:"}"}],returnBegin:!0,returnEnd:!0,subLanguage:"csharp",contains:[{begin:"@(code\\s*)?\\{",className:t},a,{begin:"{",end:"}",contains:["self"],skip:!0},n]},p={begin:"^\\s*@helper[\\s]*[^{]+[\\s]*{",returnBegin:!0,returnEnd:!0,end:"}",subLanguage:"cshtml-razor",contains:[{begin:"@helper",className:t},{begin:"{",className:t},n]},u=[{begin:"@for[\\s]*\\([^{]+[\\s]*{",end:"}"},{begin:"@if[\\s]*\\([^{]+[\\s]*{",end:"}"},{begin:"@switch[\\s]*\\([^{]+[\\s]*{",end:"}"},{begin:"@while[\\s]*\\([^{]+[\\s]*{",end:"}"},{begin:"@using[\\s]*\\([^{]+[\\s]*{",end:"}"},{begin:"@lock[\\s]*\\([^{]+[\\s]*{",end:"}"},{begin:"@foreach[\\s]*\\([^{]+[\\s]*{",end:"}"}],g={variants:u,returnBegin:!0,returnEnd:!0,subLanguage:"csharp",contains:[{variants:u.map((function(e){return{begin:e.begin}})),returnBegin:!0,contains:[{begin:"@",className:t},{variants:u.map((function(e){return{begin:e.begin.substr(1,e.begin.length-2)}})),subLanguage:"csharp"},{begin:"{",className:t}]},a,{variants:[{begin:"}[\\s]*else\\sif[\\s]*\\([^{]+[\\s]*{"},{begin:"}[\\s]*else[\\s]*{"}],returnBegin:!0,contains:[{begin:"}",className:t},{variants:[{begin:"[\\s]*else\\sif[\\s]*\\([^{]+[\\s]*{"},{begin:"[\\s]*else[\\s]*"}],subLanguage:"csharp"},{begin:"{",className:t}]},r,n]},E={begin:"@try[\\s]*{",end:"}",returnBegin:!0,returnEnd:!0,subLanguage:"csharp",contains:[{begin:"@",className:t},{begin:"try[\\s]*{",subLanguage:"csharp"},{variants:[{begin:"}[\\s]*catch[\\s]*\\([^\\)]+\\)[\\s]*{"},{begin:"}[\\s]*finally[\\s]*{"}],returnBegin:!0,contains:[{begin:"}",className:t},{variants:[{begin:"[\\s]*catch[\\s]*\\([^\\)]+\\)[\\s]*"},{begin:"[\\s]*finally[\\s]*"}],subLanguage:"csharp"},{begin:"{",className:t}]},a,r,n]},S="@section[\\s]+[a-zA-Z0-9]+[\\s]*{",b=[d,p,m,g,{begin:S,returnBegin:!0,returnEnd:!0,end:"}",subLanguage:"cshtml-razor",contains:[{begin:S,className:t},r,n]},{begin:"@await ",returnBegin:!0,subLanguage:"csharp",end:"(\\r|\\n|<|\\s)",contains:[{begin:"@await ",className:t},{begin:"[<\\r\\n]",endsParent:!0}]},E,{variants:[{begin:"@@"},{begin:"[a-zA-Z]+@"}],skip:!0},s,i,l,{className:"meta",begin:"<!DOCTYPE",end:">",relevance:10,contains:[{begin:"\\[",end:"\\]"}]},{begin:"<\\!\\[CDATA\\[",end:"\\]\\]>",relevance:10}].concat(c);return[m,g,E].forEach((function(e){var t=b.filter((function(t){return t!==e})),n=e.contains.indexOf(a);e.contains.splice.apply(e.contains,[n,1].concat(t))})),{aliases:["cshtml","razor","razor-cshtml","cshtml-razor"],contains:b}}},8416:e=>{function t(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach((a=>{const n=e[a],r=typeof n;"object"!==r&&"function"!==r||Object.isFrozen(n)||t(n)})),e}class a{constructoLine truncated
|
||||
(()=>{function e(e){if(!e)return;const t=`#${e}`;if(window.location.hash!==t){const e=new URL(window.location.href);e.hash=t,history.replaceState(null,"",e)}}window.appendMathJaxScript=function(e){if(document.getElementById(e))return;const t=document.createElement("script");t.id=e,t.type="text/javascript",t.src="_content/MudBlazor.Markdown/MudBlazor.Markdown.MathJax.min.js",document.head.appendChild(t)},window.refreshMathJaxScript=function(){try{MathJax.typeset()}catch(e){}},window.MudBlazorMarkdown={scrollToElementId:function(t,n){const o=document.getElementById(t);o&&(e(t),n&&n.invokeMethodAsync("OnActiveElementChangedAsync",t),MudBlazorMarkdown.tableOfContents.scrollLock++,o.scrollIntoView({behavior:"smooth",block:"start",inline:"nearest"}),setTimeout((()=>{MudBlazorMarkdown.tableOfContents.scrollLock--,MudBlazorMarkdown.tableOfContents.scrollLock<0&&(MudBlazorMarkdown.tableOfContents.scrollLock=0)}),1e3))},copyTextToClipboard:async function(e){try{return await navigator.clipboard.writeText(e),!0}catch(e){return!1}},tableOfContents:{scrollLock:0,handleRefs:{},activeElementIds:{},startScrollSpy:function(t,n){if(!t)return;const o=document.getElementById(t);if(!o)return;const r=o.querySelectorAll(".mud-markdown-toc-heading");if(!r.length)return;const c=document.querySelector(".mud-appbar"),l=c?.getBoundingClientRect().height??0,a=()=>{if(MudBlazorMarkdown.tableOfContents.scrollLock>0)return;let o,c=-Number.MAX_VALUE;for(const e of r){const t=e.getBoundingClientRect().top-l;t>0||t<c||(c=t,o=e.id)}o||(o=r[0]?.id),o!==this.activeElementIds[t]&&(this.activeElementIds[t]=o,e(o),n.invokeMethodAsync("OnActiveElementChangedAsync",o))};this.handleRefs[t]=a,document.addEventListener("scroll",a,!0),document.addEventListener("resize",a,!0),a()},stopScrollSpy:function(e){if(!e)return;const t=this.handleRefs[e];t&&(document.removeEventListener("scroll",t,!0),window.removeEventListener("resize",t,!0),delete this.handleRefs[e],delete this.activeElementIds[e])}}}})();
|
||||
Reference in new issue
Block a user