Ok - if you could explain the bit about dragging dropping the commands that would be helpful since I can't quite picture it.
Preferably, I would like the sonic to have all the codes stored on it and be able to recognise what model tele it's dealing with (either from turning it on using the tv b-gone feature or another tv function - since it would know which IR code worked and assign it to a tv model). Then it could have all the IR codes already stored on the sonic itself ready to be used.
That could be an issue if there are multiple devices in the room, say a TV and a home theater sound system. It would find the more popular brand higher in the chain first and default to that and wouldn't get to any device lower on the chain sequence. Plenty of other devices use IR signals as well, like air conditioners, remote control lights, and as we've discovered recently, some electronic door locks. It would be a shame to limit the control to just televisions when it uses a signal utilized by so many other devices.
With an open source app reference, any codes could be added to the online database (be it a user contributed section or an automatic update for new devices as they hit the market). The app would reference that comprehensive online database, so the possibilities would be unlimited. The problems with codes being stored on the sonic are a) storage capacity and b) the inability to add more. There could be an option to update the internal database through the USB charge port but you would have to plug the sonic into your computer and add them from an application or online reference from there, which would be inconvenient when you're out and about.
With a smart phone app and bluetooth connectivity, however, all that could be done from the phone. The 'drag and drop' idea would create a user friendly way to assign codes to the sonic gestures. For example, a diagram of the sonic on one side of the app screen would have an area representing each gesture where most appropriate to place it in the diagram and on the other side of the app screen would be the reference list, organized in a hierarchy of make>model>function, so navigating the functions (and their respective codes) would be as simple as navigating folders on your computer. Once you find the make and model in the online database reference list, it would open a sub-list of all of the commands available on that model, by name (ie power, channel up, channel down, volume up, volume down, menu, home, etc.) each of which could be dragged over to the diagram and dropped into areas with their corresponding gestures. The app would then assign that command/IR code to the chosen gesture. Simply scroll the list, find your 13 commands, drag each one to the appropriate location on the diagram, and now you can control all those functions of the specified device with the corresponding gestures of the sonic. Additionally, any set of mapped commands could be saved and referenced later in a list of presets for quick access. You could create a preset for every device in your house and choose them from the phone as you want to use them. Likewise, you could add as many presets of other devices as you want. And once the set of codes has been chosen and sent to the sonic, local storage could keep it saved and phone would no longer be needed until you want to add new device commands later on.
Also, since the sonic is connected to your phone, the app could activate some of its functions and more fun could be had by sonic-ing your smartphone and the such. But that would just be icing on the cake!