@@ -38,7 +38,7 @@ const pruneFullTool = (state: SessionState, logger: Logger, messages: WithParts[
3838 if ( part . type !== "tool" ) {
3939 continue
4040 }
41- if ( ! state . prune . toolIds . includes ( part . callID ) ) {
41+ if ( ! state . prune . toolIds . has ( part . callID ) ) {
4242 continue
4343 }
4444 if ( part . tool !== "edit" && part . tool !== "write" ) {
@@ -79,7 +79,7 @@ const pruneToolOutputs = (state: SessionState, logger: Logger, messages: WithPar
7979 if ( part . type !== "tool" ) {
8080 continue
8181 }
82- if ( ! state . prune . toolIds . includes ( part . callID ) ) {
82+ if ( ! state . prune . toolIds . has ( part . callID ) ) {
8383 continue
8484 }
8585 if ( part . state . status !== "completed" ) {
@@ -105,7 +105,7 @@ const pruneToolInputs = (state: SessionState, logger: Logger, messages: WithPart
105105 if ( part . type !== "tool" ) {
106106 continue
107107 }
108- if ( ! state . prune . toolIds . includes ( part . callID ) ) {
108+ if ( ! state . prune . toolIds . has ( part . callID ) ) {
109109 continue
110110 }
111111 if ( part . state . status !== "completed" ) {
@@ -133,7 +133,7 @@ const pruneToolErrors = (state: SessionState, logger: Logger, messages: WithPart
133133 if ( part . type !== "tool" ) {
134134 continue
135135 }
136- if ( ! state . prune . toolIds . includes ( part . callID ) ) {
136+ if ( ! state . prune . toolIds . has ( part . callID ) ) {
137137 continue
138138 }
139139 if ( part . state . status !== "error" ) {
@@ -158,7 +158,7 @@ const filterCompressedRanges = (
158158 logger : Logger ,
159159 messages : WithParts [ ] ,
160160) : void => {
161- if ( ! state . prune . messageIds ?. length ) {
161+ if ( ! state . prune . messageIds ?. size ) {
162162 return
163163 }
164164
@@ -193,7 +193,7 @@ const filterCompressedRanges = (
193193 }
194194
195195 // Skip messages that are in the prune list
196- if ( state . prune . messageIds . includes ( msgId ) ) {
196+ if ( state . prune . messageIds . has ( msgId ) ) {
197197 continue
198198 }
199199
0 commit comments