MCPcopy Create free account
hub / github.com/Palm1r/QodeAssist / estimateFileTokens

Method estimateFileTokens

context/TokenUtils.cpp:64–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62}
63
64int TokenUtils::estimateFileTokens(const Context::ContentFile &file)
65{
66 if (isImageFilePath(file.filename))
67 return estimateImageAttachmentTokens(QString());
68
69 int total = 0;
70
71 total += estimateTokens(file.filename);
72 total += estimateTokens(file.content);
73 total += 5;
74
75 return total;
76}
77
78int TokenUtils::estimateFilesTokens(const QList<Context::ContentFile> &files)
79{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected