Skip to content

Commit f123ffc

Browse files
refactor: Move URLContext to internal
Moved URLContext to be an internal type within the FirebaseAI module. This involved: - Moving the file to `FirebaseAI/Sources/Types/Internal/Tools/URLContext.swift`. - Removing the `public` keyword from the struct. - Making the `Tool.urlContext()` factory method internal. - Updating documentation comments that referenced the now-internal type. Could not run tests due to environment limitations.
1 parent f089a87 commit f123ffc

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

FirebaseAI/Sources/Tool.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ public struct Tool: Sendable {
131131
return self.init(googleSearch: googleSearch)
132132
}
133133

134-
public static func urlContext() -> Tool {
134+
static func urlContext() -> Tool {
135135
return self.init(urlContext: URLContext())
136136
}
137137

FirebaseAI/Sources/Types/Public/Tools/URLContext.swift renamed to FirebaseAI/Sources/Types/Internal/Tools/URLContext.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@
1313
// limitations under the License.
1414

1515
@available(iOS 15.0, macOS 12.0, macCatalyst 15.0, tvOS 15.0, watchOS 8.0, *)
16-
public struct URLContext: Sendable, Encodable {
16+
struct URLContext: Sendable, Encodable {
1717
init() {}
1818
}

FirebaseAI/Sources/Types/Public/URLContextMetadata.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
/// Metadata related to the ``URLContext`` tool.
15+
/// Metadata related to the URLContext tool.
1616
@available(iOS 15.0, macOS 12.0, macCatalyst 15.0, tvOS 15.0, watchOS 8.0, *)
1717
public struct URLContextMetadata: Sendable, Hashable {
1818
/// List of URL context.

FirebaseAI/Sources/Types/Public/URLMetadata.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public struct URLMetadata: Sendable, Hashable {
4949
AILog.MessageCode.urlMetadataUnrecognizedURLRetrievalStatus
5050
}
5151

52-
/// The URL retrieved by the ``URLContext`` tool.
52+
/// The URL retrieved by the URLContext tool.
5353
public let retrievedURL: URL?
5454

5555
/// The status of the URL retrieval.

0 commit comments

Comments
 (0)