* AI Chat: show web sources that were used (normally via web search) to generate the response * Persist WebSource events * include upstream's sanitized_image_source in android builds * database gets AssertLongCPUWorkAllowed();
12 lines
569 B
TypeScript
12 lines
569 B
TypeScript
// Copyright (c) 2025 The Brave Authors. All rights reserved.
|
|
// This Source Code Form is subject to the terms of the Mozilla Public
|
|
// License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
// You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
|
|
// This simple string concat is made to a utility so it can be overriden in
|
|
// Storybook. The C++ WebUI must add either SanitizedImageSource or
|
|
// UntrustedSanitizedImageSource.
|
|
export default function createSanitizedImageUrl(imageUrl: string) {
|
|
return `//image?url=${encodeURIComponent(imageUrl)}`
|
|
}
|