Hi Woerlz,
In my understanding, when you draw Component Diagram, where you define the component will lead to where is the location of the component, so you can see the difference from below two after you add relations:
1) A -> B still outside of your frame, although your link is within frame
@startuml
component A
component B
frame "TheFrame" {
A -> B
}
@enduml
2) A is outside and B is inside your frame, the link is cross the boundary
@startuml
component A
frame "TheFrame" {
component B
A -> B
}
@enduml
So, for your question, you need to define Component B inside Frame.
Xiaoqi