Skip to content

Commit e0dab82

Browse files
committed
allowing redundant reads
1 parent cdc6ef9 commit e0dab82

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>uno.anahata</groupId>
88
<artifactId>gemini-java-client</artifactId>
9-
<version>1.0.10</version>
9+
<version>1.0.11</version>
1010
<packaging>jar</packaging>
1111

1212
<name>gemini-java-client</name>

src/main/java/uno/anahata/ai/tools/spi/LocalFiles.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,14 +89,16 @@ public static FileInfo readFile(
8989
throw new IOException("Path is a directory, not a file: " + path);
9090
}
9191

92-
// Redundant Read Check
92+
// Redundant Read Check
93+
/*
9394
ResourceTracker rt = Chat.getCallingInstance().getContextManager().getResourceTracker();
9495
Optional<StatefulResourceStatus> status = rt.getStatefulResourcesOverview().stream()
9596
.filter(s -> s.getResourceId().equals(path))
9697
.findFirst();
9798
if (status.isPresent() && status.get().getStatus() == ResourceStatus.VALID) {
9899
throw new RuntimeException("Redundant Read: The text file at " + path + " is already VALID in your context. Do not reload it.");
99100
}
101+
*/
100102

101103
String content = Files.readString(filePath);
102104
long lastModified = Files.getLastModifiedTime(filePath).toMillis();

0 commit comments

Comments
 (0)