Skip to content

Commit 0b9c4c8

Browse files
committed
fix: remove unnecessary comments
1 parent ccf385b commit 0b9c4c8

File tree

4 files changed

+3
-26
lines changed

4 files changed

+3
-26
lines changed

cli/src/chat.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ export const App = ({
100100
const theme = useTheme()
101101
const resolvedThemeName = useResolvedThemeName()
102102

103-
104103
// Get formatted logo for display in chat messages
105104
const contentMaxWidth = Math.max(10, Math.min(terminalWidth - 4, 80))
106105
const { textBlock: logoBlock } = useLogo({ availableWidth: contentMaxWidth })
@@ -801,7 +800,6 @@ export const App = ({
801800
event.type === 'start'
802801
? 'Main agent timer started'
803802
: `Main agent timer stopped (${event.outcome})`
804-
// no info-level logging
805803
},
806804
[agentId],
807805
)
@@ -839,7 +837,6 @@ export const App = ({
839837
hasAutoSubmittedRef.current = true
840838

841839
const timeout = setTimeout(() => {
842-
// no info-level logging
843840
if (sendMessageRef.current) {
844841
sendMessageRef.current({ content: initialPrompt, agentMode })
845842
}
@@ -962,7 +959,7 @@ export const App = ({
962959
topLevelMessages: virtualTopLevelMessages,
963960
availableWidth: separatorWidth,
964961
theme,
965-
962+
966963
collapsedAgents,
967964
streamingAgents,
968965
isWaitingForResponse,

cli/src/hooks/use-auth-query.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -113,28 +113,23 @@ export function useLoginMutation(deps: UseLoginMutationDeps = {}) {
113113

114114
return useMutation({
115115
mutationFn: async (user: User) => {
116-
// no info-level logging
117-
118116
// Save credentials to file system
119117
saveUserCredentials(user)
120-
// no info-level logging
121118

122119
// Validate the new credentials
123120
const authResult = await validateApiKey({
124121
apiKey: user.authToken,
125122
getUserInfoFromApiKey,
126123
logger,
127124
})
128-
// no info-level logging
129125

130126
const mergedUser = { ...user, ...authResult }
131-
// no info-level logging
127+
132128
return mergedUser
133129
},
134130
onSuccess: (data) => {
135131
// Invalidate auth queries to trigger refetch with new credentials
136132
queryClient.invalidateQueries({ queryKey: authQueryKeys.all })
137-
// no info-level logging
138133
},
139134
onError: (error) => {
140135
logger.error(

cli/src/hooks/use-login-polling.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,6 @@ export function useLoginPolling({
5555

5656
let active = true
5757

58-
// no info-level logging
59-
6058
const sleep = (ms: number) =>
6159
new Promise<void>((resolve) => {
6260
setTimeout(resolve, ms)
@@ -83,7 +81,6 @@ export function useLoginPolling({
8381

8482
if (result.status === 'success') {
8583
const user = result.user as User
86-
// no info-level logging
8784

8885
onSuccessRef.current(user)
8986
} else if (result.status === 'timeout') {

cli/src/login/login-flow.ts

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ export async function generateLoginUrl(
2323
const { fetch, logger } = deps
2424
const { baseUrl, fingerprintId } = options
2525

26-
// no info-level logging
27-
2826
const url = `${baseUrl}/api/auth/cli/code`
2927
const response = await fetch(url, {
3028
method: 'POST',
@@ -34,8 +32,6 @@ export async function generateLoginUrl(
3432
body: JSON.stringify({ fingerprintId }),
3533
})
3634

37-
// no info-level logging
38-
3935
if (!response.ok) {
4036
logger.error(
4137
{
@@ -49,8 +45,6 @@ export async function generateLoginUrl(
4945

5046
const data = (await response.json()) as LoginUrlResponse
5147

52-
// no info-level logging
53-
5448
return data
5549
}
5650

@@ -95,8 +89,6 @@ export async function pollLoginStatus(
9589
const startTime = now()
9690
let attempts = 0
9791

98-
// no info-level logging
99-
10092
while (true) {
10193
if (shouldContinue && !shouldContinue()) {
10294
logger.warn('🛑 Polling aborted by caller')
@@ -115,8 +107,6 @@ export async function pollLoginStatus(
115107
url.searchParams.set('fingerprintHash', fingerprintHash)
116108
url.searchParams.set('expiresAt', expiresAt)
117109

118-
// no info-level logging
119-
120110
let response: Response
121111
try {
122112
response = await fetch(url.toString())
@@ -132,8 +122,6 @@ export async function pollLoginStatus(
132122
continue
133123
}
134124

135-
// no info-level logging
136-
137125
if (!response.ok) {
138126
if (response.status !== 401) {
139127
logger.warn(
@@ -167,7 +155,7 @@ export async function pollLoginStatus(
167155
const rawUser = (data as { user?: unknown } | null)?.user
168156
if (rawUser && typeof rawUser === 'object') {
169157
const user = rawUser as Record<string, unknown>
170-
// no info-level logging
158+
171159
return { status: 'success', user, attempts }
172160
}
173161

0 commit comments

Comments
 (0)