diff --git a/lib/msgfmt/agent_readiness.go b/lib/msgfmt/agent_readiness.go index c814685b..e545b5c7 100644 --- a/lib/msgfmt/agent_readiness.go +++ b/lib/msgfmt/agent_readiness.go @@ -15,7 +15,7 @@ func IsAgentReadyForInitialPrompt(agentType AgentType, message string) bool { case AgentTypeCopilot: return isGenericAgentReadyForInitialPrompt(message) case AgentTypeAmp: - return isGenericAgentReadyForInitialPrompt(message) + return isAmpAgentReadyForInitialPrompt(message) case AgentTypeCursor: return isGenericAgentReadyForInitialPrompt(message) case AgentTypeAuggie: @@ -48,3 +48,9 @@ func isCodexAgentReadyForInitialPrompt(message string) bool { messageWithoutInputBox := removeCodexInputBox(message) return len(messageWithoutInputBox) != len(message) } + +func isAmpAgentReadyForInitialPrompt(message string) bool { + message = trimEmptyLines(message) + messageWithoutInputBox := removeAmpMessageBox(message) + return len(messageWithoutInputBox) != len(message) +} diff --git a/lib/msgfmt/testdata/initialization/amp/ready/msg.txt b/lib/msgfmt/testdata/initialization/amp/ready/msg.txt index a3be16bd..f9fc1db3 100644 --- a/lib/msgfmt/testdata/initialization/amp/ready/msg.txt +++ b/lib/msgfmt/testdata/initialization/amp/ready/msg.txt @@ -1,25 +1,30 @@ - ............ - ..:::-------::::... - ..::--=========---:::... Welcome to Amp - .::-===++++++++===---:::.. - ..:--==+++******+++===--:::... - .:--=+++**********++===--:::... Type / to use slash commands - .::-==++***#####****++==---:::.. Type @ to mention files - .:--=++****#####****++===---::... Ctrl+C to exit - .:--=+++****###****+++===---:::.. - .:--==+++*********++++===---:::.. - ..:--==++++*****++++====----:::.. /help for more - .::--===+++++++++====-----:::... - .::---===========------::::... - ..:::-------------:::::::... amp -x "Run the linter and fix the errors" - ...::::::::::::::::..... - .................. - - - - -─────────────── -> -─────────────── + + + .............. + .....:::::.......... Welcome to Amp + ....:::::::::::.......... + ....::::----::::::::....... + ...::::---------:::::::::..... Ctrl+O to execute commands + ...::::------------:::::::::... Type @ to mention files + ....::----=======-----::::::::... Ctrl+C to exit + ...:::---==========-----::::::... + ...::---====++++====-----:::::... + ...::--====++++++====----:::::.. Use the amp: help command for more information + ..::---===++++++====----::::... + ..:::--====+++++====----:::... + ..:::---==========---::::.. Smart mode now uses Gemini 3 Pro. + ..:::----===-----::::... + ...::::----:::::... + ............ + + + + + +╭─smart (click or Ctrl+S to switch)─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ +│ │ +│ │ +│ │ +╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────~/Documents/work/agentapi (fix-amp-formatting)─╯