on main help sign in
chore(permissions): no need to generate a cache key
commit9275e770b9f6ad03b37faa9f7b24be4fcf68676f authorAndrey Nering <andreynering@users.noreply.github.com> dateWed 25 Jun 2025, 14:17 (1 year ago) parent119d903
1 file changed+1−15
internal/tui/components/dialogs/permissions/permissions.go+1−15
internal/tui/components/dialogs/permissions/permissions.go+1−15
@@ -273,22 +273,9 @@ func (p *permissionDialogCmp) renderHeader() string {
273273 return baseStyle.Render(lipgloss.JoinVertical(lipgloss.Left, headerParts...))
274274}
275275
276−func (p *permissionDialogCmp) generateContentKey() string {
277− return fmt.Sprintf("%s_%s_%t_%d_%d_%d_%d",
278− p.permission.ID,
279− p.permission.ToolName,
280− p.diffSplitMode,
281− p.diffXOffset,
282− p.diffYOffset,
283− p.contentViewPort.Width(),
284− p.contentViewPort.Height())
285−}
286−
287276func (p *permissionDialogCmp) getOrGenerateContent() string {
288− currentKey := p.generateContentKey()
289−
290277 // Return cached content if available and not dirty
291− if !p.contentDirty && p.cachedContentKey == currentKey && p.cachedContent != "" {
278+ if !p.contentDirty && p.cachedContent != "" {
292279 return p.cachedContent
293280 }
294281
@@ -309,7 +296,6 @@ func (p *permissionDialogCmp) getOrGenerateContent() string {
309296
310297 // Cache the result
311298 p.cachedContent = content
312− p.cachedContentKey = currentKey
313299 p.contentDirty = false
314300
315301 return content