mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-04 20:47:22 +00:00
Added a Send to menu to every chat message and kept restrictions when sending content on (#1124)
This commit is contained in:
1 parent
d06688ca08
commit
bf54b8cd0d
73 files changed
+1923
-390
No files matched your search
@@ -338,4 +338,81 @@ window.dropZones = {
|
||||
list: function () {
|
||||
return Array.from(document.querySelectorAll('[data-drop-zone-id]'), zone => zone.getAttribute('data-drop-zone-id'))
|
||||
}
|
||||
}
|
||||
|
||||
// Keeps an open popover inside the window while its content grows or shrinks.
|
||||
//
|
||||
// MudBlazor 8.15 places an open popover when it opens, when the window is resized or scrolled, and when the
|
||||
// component of the popover renders again. It never measures the popover afterward, though. Content which
|
||||
// unfolds later, such as the unavailable tools of the tool selection or a panel of the data source selection,
|
||||
// lets the popover grow out of the window until something unrelated places it again. So we place an open
|
||||
// popover again whenever its size changes, at most once per frame, which keeps it at its anchor during the
|
||||
// whole animation. Placing a popover may change its size once, when MudBlazor limits its height to the
|
||||
// window, but placing it again at the same spot changes nothing, so this settles right away.
|
||||
//
|
||||
// This relies on window.mudpopoverHelper.placePopoverByNode, which is internal to MudBlazor. It exists in
|
||||
// 8.15 and 9.2; without it, this does nothing. Check it with every new MudBlazor version.
|
||||
const popoverResize = (function () {
|
||||
const resizedPopovers = new Set()
|
||||
let isPlacementPending = false
|
||||
|
||||
const placeResizedPopovers = function () {
|
||||
isPlacementPending = false
|
||||
for (const popover of resizedPopovers) {
|
||||
if (popover.isConnected && popover.classList.contains('mud-popover-open'))
|
||||
window.mudpopoverHelper?.placePopoverByNode?.(popover)
|
||||
}
|
||||
|
||||
resizedPopovers.clear()
|
||||
}
|
||||
|
||||
const resizeObserver = new ResizeObserver(function (entries) {
|
||||
for (const entry of entries)
|
||||
resizedPopovers.add(entry.target)
|
||||
|
||||
if (isPlacementPending)
|
||||
return
|
||||
|
||||
isPlacementPending = true
|
||||
requestAnimationFrame(placeResizedPopovers)
|
||||
})
|
||||
|
||||
// MudBlazor renders the content of every popover as a direct child of the provider:
|
||||
const observePopover = function (node) {
|
||||
if (node instanceof Element && node.classList.contains('mud-popover'))
|
||||
resizeObserver.observe(node)
|
||||
}
|
||||
|
||||
const forgetPopover = function (node) {
|
||||
if (node instanceof Element)
|
||||
resizeObserver.unobserve(node)
|
||||
}
|
||||
|
||||
const observeProvider = function () {
|
||||
const provider = document.querySelector('.mud-popover-provider')
|
||||
if (!provider)
|
||||
return false
|
||||
|
||||
provider.childNodes.forEach(observePopover)
|
||||
new MutationObserver(function (mutations) {
|
||||
for (const mutation of mutations) {
|
||||
mutation.addedNodes.forEach(observePopover)
|
||||
mutation.removedNodes.forEach(forgetPopover)
|
||||
}
|
||||
}).observe(provider, { childList: true })
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
return { observeProvider: observeProvider }
|
||||
})()
|
||||
|
||||
// The provider appears only once Blazor has rendered the app, so we wait for it, and only for it:
|
||||
if (!popoverResize.observeProvider()) {
|
||||
const providerObserver = new MutationObserver(function () {
|
||||
if (popoverResize.observeProvider())
|
||||
providerObserver.disconnect()
|
||||
})
|
||||
|
||||
providerObserver.observe(document.body, { childList: true, subtree: true })
|
||||
}
|
||||
@@ -36,6 +36,7 @@
|
||||
- Added organization-wide management for whether AI Studio reads a file attached to a chat again after it has changed. IT departments can set this for everybody, either fixed or as a default which users may change.
|
||||
- Added a way for IT departments to slow down the indexing of local data sources, so that a few people with large folders or mailboxes no longer keep a shared embedding server busy for hours. IT departments set the shortest and the longest pause between the indexing steps, either fixed or as a default which users may change.
|
||||
- Added a way to switch off tools you never need, for example, the Confluence search when you have no Confluence. Switched-off tools no longer appear in any tool selection, and the AI cannot use them. You find the switch for each tool in the app settings, under Tool Settings.
|
||||
- Added a "Send to" menu to every message in the chat, yours as well as the AI's. For example, when a long discussion ends with a good report, you can send it to the Slide Assistant or to the SWOT Analysis Assistant. You can also send a message into a new chat, where it waits in the message field until you send it.
|
||||
- Improved the Read Web Page tool. When you have not allowed the AI to choose web addresses freely, the tool now refuses every address that does not appear in your chat or in what the tools returned, instead of only asking the AI not to read it.
|
||||
- Improved the installation on macOS: AI Studio is now signed and checked by Apple, so it opens like any other app. You no longer need the Terminal.
|
||||
- Improved the installation on Windows: AI Studio is now signed, so Windows shows who published it. For a while, Windows may still ask you to confirm the installation until it knows the app better.
|
||||
@@ -157,6 +158,11 @@
|
||||
- Fixed the configuration of your organization being able to preset a format for the result files of the Batch Processing assistant which cannot hold an entire answer, such as a table. AI Studio now ignores such a format and keeps the one you chose.
|
||||
- Fixed file sizes being rounded down to whole numbers, e.g., in the information about a local data source, where 1.9 MB appeared as 1 MB. They now show their decimals with the separator of your language.
|
||||
- Fixed the close button of the confidence card, which always said "Close" in English, even when AI Studio shows another language, such as German.
|
||||
- Fixed the "Send to" menu of an assistant offering that very assistant, where choosing it did nothing. The menu now lists only the other assistants and a new chat.
|
||||
- Fixed a security issue in sending the result of an assistant to another assistant or into the chat. The result now keeps the restrictions of where it came from, e.g., which AI providers may see it and whether the AI may search the web after it read your mails or your wiki.
|
||||
- Fixed the Visual Briefing assistant replacing the instruction of the briefing you had open when you sent a text to it from another assistant. The text now starts a new briefing, and your other briefings stay as they were.
|
||||
- Fixed long menus, such as "Send to" or the profile selection, running past the edge of the window, which made their lower entries unreachable. These menus now scroll.
|
||||
- Fixed the tool selection and the data source selection growing out of the window when you show more of their content, e.g., the tools that are not available. They now stay in view.
|
||||
- Updated the code contributions on the supporters page, which now thank everyone who has contributed code to AI Studio so far.
|
||||
- Upgraded several libraries to improve security.
|
||||
- Upgraded to Rust v1.99.1
|
||||
|
||||
Reference in new issue
Block a user